diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 534d55e3..00000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -_build -*.bak -*~ - -#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 1a235d9b..00000000 --- a/_templates/menu01.html +++ /dev/null @@ -1,19 +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 eb0b3667..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 -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. - -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 bd30d323..00000000 --- a/community.rst +++ /dev/null @@ -1,24 +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. 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/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/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 6cb5fff6..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: - -.. raw:: html - - - Please update your PDFgui to PDFgui v2.0, the first Python 3 version of the software (May 10, 2023) - -   - Get PDFgui v2.0 -   - Credits

- - - -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 - -DiffPy is the home of the |DiffPyCMI| -Complex Modeling framework, a modular software framework for robust and extensible -modeling of diffraction data. We welcome contributions to this project from the -community. - -The project is currently centered at `Brookhaven National Laboratory`_, a US `Department of -Energy, Office of Basic Energy Sciences`_ funded laboratory. -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. This project was previously -centered at Columbia University and, before that, Michigan State University. - - - - -.. _danse: http://danse.us/ - -.. _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/ - -.. image:: images/blank1x1.png - :align: left - :height: 10 - -.. figure:: logos/BNL_logo.jpg - :align: left - :target: `Brookhaven National Laboratory`_ - -.. figure:: logos/DOE_logo.png - :align: right - :target: `Department of Energy, Office of Basic Energy Sciences`_ - -.. 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 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/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/cmi_exchange.rst b/products/diffpycmi/cmi_exchange.rst deleted file mode 100644 index ae136dda..00000000 --- a/products/diffpycmi/cmi_exchange.rst +++ /dev/null @@ -1,76 +0,0 @@ -CMI Exchange -============= - -The `CMI Exchange`_ is a collection of community developed scripts, -functions, and IPython plugins that make use of the |diffpycmi| -framework. If you are new to |diffpycmi| it is a great place to get -started. If you've been working with |diffpycmi| for a while and feel -that others would benefit from seeing your code please contribute! - -.. _cmi exchange: https://github.com/diffpy/cmi_exchange#cmi-exchange - -.. _new_users: - -For New Users -------------- - -Begin by visiting the `CMI Exchange on github -`_. As with all -github projects you will see the following two buttons in the sidebar -allowing you to clone the project in your desktop or download a zip -file: - -.. image:: ../../images/github_screenshot.png - -For now simply follow the download zip link to get the entire project -and unpack the zip file to a convenient location on your machine. If -you have correctly installed the |DiffPyCMI| package you -can start running the scripts right away. Just follow the instructions -in `New User Tips -`_. - -You'll notice that there are two directories: ``cmi_plugins`` and -``cmi_scripts``. The scripts are standalone python scripts that can be -run directly from the `IPython`_ command line, whereas the plugins are a -set of functions and `IPython extensions`_ -that provide additional functionality to your IPython session. - -Scripts -^^^^^^^ - -To run a script, simply navigate to the directory containing the .py -file and type:: - - $ ipython --pylab - In [1]: %run script_name.py - -Extensions -^^^^^^^^^^ - -`IPython extensions`_ are importable IPython modules that can modifpy -the behavior of the shell to add functionality. They are installed and -activated from the IPython command line by running:: - - In [1]: %install_ext name_of_extension.py - In [2]: %load_ext name_of_extenstion - - -.. _ipython: http://ipython.org/ - -.. _ipython extensions: http://ipython.org/ipython-doc/rel-0.12.1/config/extensions/index.html - - -.. _contribute_scripts: - -Contribute Scripts ------------------- - -To contribute your own script to the CMI Exchange you must first fork -the project on github. Once you've added your own code you can issue a -pull request. - -If you're new to git and don't know what it means to fork a project -`begin here `_. - - -.. include:: ../../abbreviations.txt diff --git a/products/diffpycmi/contents.rst b/products/diffpycmi/contents.rst deleted file mode 100644 index 83edf944..00000000 --- a/products/diffpycmi/contents.rst +++ /dev/null @@ -1,92 +0,0 @@ -.. _contents: - -|diffpycmi| Contents -=================== - -The |diffpycmi| release includes Python and C++ libraries developed by -the DiffPy team as well as external libraries necessary for functionality. - -Libraries developed by the DiffPy team --------------------------------------- - -.. list-table:: - :widths: 10, 5, 30 - :header-rows: 1 - - * - Library - - - - Description - - * - `diffpy.srfit`_ - - |doc-diffpy.srfit|_ - - Setup and control of general fitting problems. - - * - `diffpy.srreal`_ - - |doc-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`_ - - |doc-diffpy.structure|_ - - Light-weigth storage of crystal structure data. - - * - `diffpy.utils`_ - - |doc-diffpy.utils|_ - - General purpose utilities for the diffpy libraries. - - * - `pyobjcryst`_ - - |doc-pyobjcryst|_ - - Python bindings to the ObjCryst++ crystallographic library. - - * - `libdiffpy`_ - - |doc-libdiffpy|_ - - C++ library for calculation of PDF and other real-space - quantities. - - - -External libraries ------------------- - -.. list-table:: - :widths: 10, 5, 30 - :header-rows: 1 - - * - Library - - - - Description - - * - srfit-sasview_ - - `doc `__ - - Selected modules from SasView_, the Small - Angle Scattering Analysis Software Package. - - * - `periodictable`_ - - `doc `__ - - Extensible periodic table of the elements with support for mass, - density, and X-ray/neutron scattering information. - - * - `libobjcryst`_ - - `doc `__ - - ObjCryst++, crystallographic library for C++ re-packaged for - installation as a shared library. - - * - `cxxtest`_ - - `doc `__ - - Testing framework for C++. - -.. URL definitions below ----------------------------------------------- - -.. |doc-diffpy.srfit| replace:: doc -.. |doc-diffpy.srreal| replace:: doc -.. |doc-diffpy.structure| replace:: doc -.. |doc-diffpy.utils| replace:: doc -.. |doc-pyobjcryst| replace:: doc -.. |doc-libdiffpy| replace:: doc - -.. _cxxtest: http://cxxtest.com/ -.. _periodictable: http://www.reflectometry.org/danse/elements.html -.. _SasView: https://www.sasview.org - -.. include:: ../../abbreviations.txt diff --git a/products/diffpycmi/contributecode.rst b/products/diffpycmi/contributecode.rst deleted file mode 100644 index 4f9adbc8..00000000 --- a/products/diffpycmi/contributecode.rst +++ /dev/null @@ -1,37 +0,0 @@ -How to Contribute Code -====================== - -The |diffpycmi| bundle consists of the following projects, all hosted on -github. To contribute code simply fork the project you'd like to work -on and issue a pull request. - -====================== ============================================ -Module Description -====================== ============================================ -`diffpy.srfit`_ Setup and control of general fitting - problems. - -`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. - -`libdiffpy`_ C++ library for calculation of PDF and - other real-space quantities. - -`libobjcryst`_ ObjCryst++ re-packaged for installation - as a shared library -====================== ============================================ - -.. URL definitions below ----------------------------------------------- - -.. include:: ../../abbreviations.txt diff --git a/products/diffpycmi/index.rst b/products/diffpycmi/index.rst deleted file mode 100644 index b77daa4e..00000000 --- a/products/diffpycmi/index.rst +++ /dev/null @@ -1,224 +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 -============ -To install ``diffpy.cmi``, create a new conda environment or activate an existing environment and install the package from the conda-forge channel. - -.. code-block:: bash - - conda create -n diffpy.cmi-env - conda install -c conda-forge diffpy.cmi - conda activate diffpy.cmi-env - -To confirm that the installation was successful, type - -.. code-block:: bash - - cmi --version - -The output should print the latest version. - -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.cmi_env`` environment, type - -.. code-block:: bash - - pip install diffpy.cmi - -Pack and Profile Installation ------------------------------ - -Use the `cmi` command-line interface to install and manage modular optional dependencies, known as `packs`, -and to configure or execute user-defined workflows that combine multiple packs with optional post-installation steps, -known as `profiles`. To use `cmi`, you can run the following example commands: - -Show available commands and options with, - -.. code-block:: bash - - cmi -h - -List installed and available packs and profiles, - -.. code-block:: bash - - cmi pack list - cmi profile list - -Show details of a specific pack or profile, - -.. code-block:: bash - - cmi pack show - cmi profile show - -Install a pack or profile (by name or path), - -.. code-block:: bash - - cmi install - cmi install - cmi install - -.. admonition:: Example installation - - For example, to install the pack for PDF modeling, type, - - .. code-block:: bash - - cmi install pdf - - To check to see if the pack was installed, type, - - .. code-block:: bash - - cmi pack list - - The output should look something like this, - - .. code-block:: bash - - Installed: - - core - - pdf - Available to install: - - plotting - - tests - - docs - - -Download examples ------------------ - -To list and copy example scripts and data to your working directory, type, - -.. code-block:: bash - - cmi example list - cmi example copy / - -.. admonition:: Example - - For example, to see the example scripts for PDF fitting, type, - - .. code-block:: bash - - cmi example list - - The output should look something like this, - - .. code-block:: bash - - $ cmi example list - core: - - linefit - pdf: - - ch03NiModelling - - ch05Fit2Phase - - ch06RefineCrystalStructureGen - - ch07StructuralPhaseTransitions - - ch08NPRefinement - - ch11ClusterXYZ - - To copy the example for bulk Ni PDF fitting, type, - - .. code-block:: bash - - cmi example copy pdf/ch03NiModelling - - This will copy the example directory ``ch03NiModelling`` to your current working directory. Within this directory exists - the scripts and data to fit the bulk Ni PDF. - - You can then run the fitting script with, - - .. code-block:: bash - - python ch03NiModelling/solutions/diffpy-cmi/fitBulkNi.py - -What next? -========== - -* `Explore CMI exchange - `__, - our collection of example scripts and tutorials - -* :doc:`Get tips on using the CMI exchange ` - -* :doc:`Contribute code ` - - -Tutorials -========= - -* A step-by-step tutorial on using diffpy.cmi for PDF analysis is available at the documentation site for - ``diffpy.cmi`` -- https://www.diffpy.org/diffpy.cmi/tutorials/index.html. - -* Worked examples and experimental data from the book *Atomic Pair Distribution Function Analysis: A Primer* are freely available at our - `GitHub repository `_. - -* ADD2019 school and conference -- - https://github.com/diffpy/add2019-diffpy-cmi. - -Documentation -============= - -Documentation for packages developed by the DiffPy team is available -at the links below. - -* |doc-diffpy.srfit|_ -- configuration and control of data-fitting problems -* |doc-diffpy.srreal|_ -- calculators for pair distribution function, bond - valence sums, etc. -* |doc-diffpy.structure|_ -- light-weight representation of crystal - structures -* |doc-pyobjcryst|_ -- Python interface to ObjCryst++ crystallographic - library -* |doc-diffpy.utils|_ -- general purpose utilities for the diffpy libraries -* |doc-libdiffpy|_ -- C++ library for calculation of PDF and other real-space - quantities - -See :ref:`diffpy.cmi contents ` for a complete list -of open-source libraries that are included in |diffpycmi| and -their respective project pages. - - -Reference -========= - -If you use this software in a research work which leads to publication, -we ask you to acknowledge the use of |diffpycmi| 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/install.rst b/products/diffpycmi/install.rst deleted file mode 100644 index 6d6fd104..00000000 --- a/products/diffpycmi/install.rst +++ /dev/null @@ -1,188 +0,0 @@ -.. highlight:: bash - -|diffpycmi| installation from sources -==================================== - -Downloaded the most recent `diffpy.cmi tarball -`__ -and follow the steps below. - -1 Install system software ------------------------------------------------------------------------- - -|diffpycmi| requires the :ref:`system software dependencies ` -which can be installed from command line using a suitable package manager. -Here are installation commands for several supported systems. - -Ubuntu -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -For Ubuntu or other Debian-based Linux distributions 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 \ - build-essential scons git zsh - -Fedora -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Use ``yum`` for Fedora or RedHat Linux:: - - sudo yum install \ - gsl-devel boost-devel python-devel \ - python-setuptools numpy scipy \ - python-matplotlib python-lxml \ - python-ipython-notebook \ - gcc-c++ scons git zsh - -Mac OS X -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -For Mac OS X the system dependencies can be installed using the -`MacPorts `_ software manager. A similar -package system `Homebrew `_ works as well, but has -been considerably less tested with |diffpycmi|. - -For best results with MacPorts follow these tips: - -* We recommend to upgrade to the `latest version of OS X - `_. -* Install `Xcode `_. - If already present, we recommend to upgrade to the latest version. -* Be patient, it may take several hours to install all the dependencies - using MacPorts. -* Installation command may fail on the first run, but usually works - when repeated. See MacPorts - `FAQ `_ - for more help. - -To install system dependencies with MacPorts, use:: - - sudo port install \ - python27 py27-setuptools py27-ipython py27-lxml \ - gsl boost py27-numpy py27-scipy py27-matplotlib scons git - -Make sure the MacPorts versions of IPython and Python are active by -running the following commands:: - - sudo port select --set ipython ipython27 - sudo port select --set python python27 - - -**Important:** When finished installing the Mac OS X dependencies, adjust -the shell environment so that MacPorts Python is the first in the -PATH. This can be accomplished by adding the following line to either -of ``.profile`` or ``.zshenv`` file in your HOME directory :: - - export PATH="/opt/local/bin:$PATH" - - -2 Install |diffpycmi| ------------------------------------------------------------------------- - -Unzip the |diffpycmi| tarball into a directory of your choice. -Execute the included :file:`install` script and follow the prompts. :: - - # replace VERSION to match the actual filename - tar xzf diffpy_cmi-VERSION.tar.gz - cd diffpy_cmi-VERSION - ./install - -The install process may take a while and produce a plentiful output, -but should work if all required software is in place. - - -3 Test ------------------------------------------------------------------------- - -Execute the included test script, which should report no warnings -nor errors:: - - ./runtests.sh - -If there are failures they are most likely due to missing software or -incorrect versions of Python or other libraries being used together. -After addressing these issues it may be necessary to recompile the -sources by running ``./install --build``. - - -Remarks ------------------------------------------------------------------------- - -The expanded diffpy_cmi directory can be renamed or moved -to a different location and the software should still work. -The only requirement is to update the :file:`diffpy_cmi.pth` -symbolic link so it points to the new location. This can be -done by running the ``./install`` script again or by following -the steps below. - -The Python interpreter must have a symbolic link pointing to the -:file:`diffpy_cmi.pth` file in one of the directories where it -looks for :file:`.pth` files. This is normally set up by the -install script. If that process somehow fails, the preferred -:file:`pth` directory for a single-user installation can be -found using :: - - python -c 'import site; print site.USER_SITE' - -For a system-wide installation the standard :file:`pth` locations are :: - - python -c 'import site; print site.getsitepackages()' - -Once the :file:`pth` directory has been established, navigate to -the base diffpy_cmi directory and create the symbolic link with :: - - ln -si $PWD/diffpy_cmi.pth /path/to/the/pth/directory/ - -.. note:: - - It is essential to use a symbolic link. Making a copy of the - :file:`diffpy_cmi.pth` file will not work. - -.. note:: - - The installation of |diffpycmi| is entirely contained under the - expanded diffpy_cmi directory. The software can be completely - uninstalled by deleting that directory and removing the symbolic - link. - -Contacts ------------------------------------------------------------------------- - -If you need help with installing this software, please check discussions -or post your question to the -`diffpy-dev `_ -group. - ----- - -.. _dependencies: - -List of software dependencies -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -* **gsl** - GNU Scientific Library is collection of routines for numerical analysis. - -* **boost** - a set of useful C++ libraries. - -* **python-dev** - development tools for Python modules. - -* **python-setuptools** - enhancements to the Python distutils. - -* **numpy** - general-purpose array-processing for large multi-dimensional arrays in Python. - -* **scipy** - the fundamental library for scientific computing with Python. - -* **matplotlib** - a Python 2D plotting library. - -* **python-lxml** - a Python library for processing XML. - -* **ipython** - an enhanced interactive Python shell. - -* **scons** - a software build tool. - -* **git** - a version control system. - -* **zsh** - an interactive shell and powerful scripting language. 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/mPDF.rst b/products/mPDF.rst deleted file mode 100644 index 810e8b5a..00000000 --- a/products/mPDF.rst +++ /dev/null @@ -1,104 +0,0 @@ -########## -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 - -This is an early release of mpdf, and the capabilities and documentation of the -project will evolve. The DiffPy team encourages investigators to provide feedback, -suggestions, and feature requests. - - -Getting Started -================= - -The diffpy.mpdf package requires Python 2.6 or 2.7 and the following software: - -* ``NumPy`` - numerical mathematics and fast array operations for Python -* ``SciPy`` - scientific libraries for Python -* ``matplotlib`` - python plotting library -* ``diffpy.structure`` - diffpy package for generating atomic structure -* ``diffpy.srreal`` - diffpy package for calculating real-space quantities - -See the :doc:`mpdf license ` for terms and conditions of use. - -Installation ------------- - -The recommended way to install this package is through conda. For help installing conda, -please visit |anaconda-download|. -Once conda is installed, you can follow the simple steps below to install diffpy.mpdf. -You will also install the full |diffpycmi| suite along the way. - -*Step 1: Add the appropriate conda channels to your conda configuration.* :: - - conda config --add channels diffpy - conda config --add channels benfrandsen - -These commands tell conda to look through these channels on the Anaconda cloud server to -find the appropriate software. - -*Step 2 (recommended): Create and activate a conda environment for diffpy + diffpy.mpdf.* :: - - conda create --name diffpy python=2.7 - source activate diffpy - -Note that you can name the environment anything you choose by passing it a different name -after the --name flag in the first command. - -*Step 3: Install diffpy.mpdf.* :: - - conda install diffpy.mpdf - -Note that this will also install the full |diffpycmi| suite if it has not already been -installed in this environment. - -*Alternative option: Install from the python package index.* - -If you prefer to use the python package index and have pip installed, please install the -prerequisite software and then use the command :: - - pip install diffpy.mpdf - -*Alternative option: Download and install from source.* - -If you prefer to install from source, you can also zip and download the entire package -from `PyPI `__ or -`GitHub `__, then unzip the file and -execute the following command from inside the unzipped directory :: - - python setup.py install - -Note that this will only work if all the dependencies are already properly installed. - -Documentation -------------- -Please see https://pythonhosted.org/diffpy.mpdf -for the documentation. - -What next? -============ - -Explore the mpdf tutorial and examples on the -`CMI Exchange `_! - -.. toctree:: - :hidden: - - mPDFlicense 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/pdfgetx.rst b/products/pdfgetx.rst deleted file mode 100644 index cc9f5140..00000000 --- a/products/pdfgetx.rst +++ /dev/null @@ -1,149 +0,0 @@ -############################### -PDFgetX3, PDFgetN3 and PDFgetS3 -############################### - -.. include:: ../abbreviations.txt - -PDFgetX3, PDFgetN3 and PDFgetS3 are command-line utilities that -for automated batch processing. 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. - -*The software is free for open academic research, -but requires paid license for commercial use.* - -PDFgetX3 is incorporated in the powerful end-to-end x-ray PDF analysis package -:doc:`xPDFsuite `. -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. - - -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 -`Beth Kauderer `_ 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 "Express Licensing" from the navigation bar and - then "Sign In To Continue". - -3. Sign-In redirects to the top page. - Search for ``pdfgetx3`` or ``m11-120`` to return - to the licensing page again. - -4. Select "Express Licensing" again and choose - "PDFgetX3 and PDFgetN3, Free Academic". - -5. Submit the license request and wait for license confirmation email. - -6. The software will be under Top --> More --> "Manage Downloads" or just visit - https://columbia.resoluteinnovation.com/downloads. - -Sorry for the complicated process. We hope you enjoy the software! - - -Documentation -============= - -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| diff --git a/products/pdfgui.rst b/products/pdfgui.rst deleted file mode 100644 index 71659e01..00000000 --- a/products/pdfgui.rst +++ /dev/null @@ -1,191 +0,0 @@ -.. highlight:: bash -.. include:: ../abbreviations.txt - -###### -PDFgui -###### - -Overview -======== - -For users who do not have the expertise or necessity for command line analysis, 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 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 -============ - -By downloading and using this software you are agreeing to the -conditions specified in the `software license `__. - -PDFgui is distributed as a software package for -`Anaconda Python `__. PDFgui is available -for all operating systems supported by Anaconda, namely for -Linux, Mac OS X, and Windows. - -As a prerequisite for PDFgui installation, download and install -**Miniconda** (https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links) -or Anaconda Python (https://www.anaconda.com/download). - -PDFgui is available from the "conda-forge" channel of Anaconda packages. - -There are currently two different sets of instructions to install it depending on your platform. -If you want to install it on Windows, Linux, or a non-arm64 Mac OSX (i.e., if at the time of writing -your Mac does not have an M1 or M2 chip) use the first set, otherwise the second set of instructions - -Windows, macOS (non-Arm64), Linux -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the "conda-forge" channel by running the following command in a terminal: :: - - conda config --add channels conda-forge - -Create a new environment named ``diffpy.pdfgui_env`` (or any name of your choice) and -install ``diffpy.pdfgui``: :: - - conda create -n diffpy.pdfgui_env diffpy.pdfgui - -Activate the environment: :: - - conda activate diffpy.pdfgui_env - -Confirm that the installation was successful: :: - - python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)" - -macOS (Arm64) -~~~~~~~~~~~~~ - -Create a new conda environment ``diffpy.pdfgui_env``: :: - - conda config --add channels conda-forge - conda create -n diffpy.pdfgui_env python=3.13 - -Activate the environment: :: - - conda activate diffpy.pdfgui_env - -It is necessary to get versions of pdffit2 built for Mac from Python package index (Pypi). First we will install all -the dependencies from conda-forge and then the pdffit2 itself from Pypi using the following commands: :: - - conda install wxpython diffpy.utils matplotlib-base pycifrw - pip install diffpy.pdffit2 - -Finally, we want to install PDFgui, again from conda-forge: :: - - pip install diffpy.pdfgui - - - -Running pdfgui: -=============== - -.. note:: - To start PDFgui from a Terminal make sure *pdfgui_env* is - the active Anaconda environment:: - - conda activate pdfgui_env - - Alternatively, on bash terminals you can add the following line to your shell startup - file :file:`.bashrc` to define an alias which will work in - any Anaconda environment :: - - alias pdfgui="/path/to/pdfgui_env/bin/pdfgui" - - where ``/path/to`` needs to be adjusted according to the output of - ``which pdfgui`` command. - -Please consider joining the `diffpy-users `__ Google group. -News about updates and new releases will be made there, 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. - - -Documentation and help -====================== - -* The user manual is available in `HTML <../doc/pdfgui/index.html>`__ - and `PDF <../doc/pdfgui/pdfgui.pdf>`__ formats. - -* Search "PDFgui" on YouTube for some video tutorials on how to use - PDFgui. - -* For in-depth help in using 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 - -* Tutorial files are available from - `pdfgui-tutorial.zip <../doc/pdfgui/pdfgui-tutorial.zip>`__. - -* Please, join the :doc:`community forum <../community>` for tips, tricks, and feedback. - - -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 c847820b..00000000 --- a/products/pythonpackages.rst +++ /dev/null @@ -1,47 +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 github page. With the exception of PDFfit2, SrMise, -and mPDF, all of the packages listed below are bundled in the |DiffPyCMI| -release. - -====================== ============================================ -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. -====================== ============================================ - -.. URL definitions below ----------------------------------------------- - -.. _diffpy.srmise: https://github.com/diffpy/diffpy.srmise -.. _diffpy.pdffit2: https://github.com/diffpy/diffpy.pdffit2 - -.. include:: ../abbreviations.txt diff --git a/products/xPDFsuite.rst b/products/xPDFsuite.rst deleted file mode 100644 index c221b71c..00000000 --- a/products/xPDFsuite.rst +++ /dev/null @@ -1,57 +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 see xPDFsuite in action, please see the video here. (available soon) - * 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 |diffpycmi|, PDFgetX3 and PDFgui.** - -**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 85bdb2c9..00000000 --- a/publications.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. include:: abbreviations.txt - -References -========== - -The following papers in the literature describe the DiffPy products. -Please cite us if our software has been used in your research. - -* |citeLiuJac20| - -* |citeJuhasJac18| - -* |citeShiJac18| - -* |citeJuhasAca15| - -* |citeGranlundAca15| - -* |citeJuhasJac13| - -* |citeFarrowJpcm07| - -* |citeProffenJac99| - - - -Publications using |diffpycmi| -============================= - -The following papers made use of DiffPy developed software for analysis -and/or modeling. - -* |citeJensenNc16| - -* |citeFrandsenPrl16| - -* |citeTerbanCgd16| - -* |citePrillAca16| - -* |citeTerbanNan15| - -* |citePrillJac15| - -* |citeDoanNguyenAcsn14| - -* |citeBeecherJacs14| - -* |citeGhidiuCC14| - -* |citeShiPRL14| - -* |citeFarrowJac14| - -* |citeAbeykoonArxiv14| - -* |citeMengqiangZhuESTL14| - -* |citeChoiNanol14| - -* |citeJacquesNc13| - -* |citeDavisCgd13| - -* |citeYangPccp13| - -* |citeFarrowJacs13| - -* |citeTyrstedAcie12| - -* |citeJensenJacs12| - -* |citeMengqiangZhuGca12| 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/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/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-