Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdfmorph web-page #23

Open
wants to merge 24 commits into
base: source
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3cd884f
Added infrastructure for PDFmorph web-page
RomanMatthew Jul 9, 2019
59c2995
Added relevant PDFmorph web-page files
RomanMatthew Jul 9, 2019
726a7b1
Update pdfmorph_license.txt
RomanMatthew Jul 9, 2019
27a78fc
Removed xPDFsuite paragraph from pdfmorph.rst
RomanMatthew Jul 9, 2019
b05ea1a
Merge branch 'pdfmorph_web' of https://github.com/RomanMatthew/diffpy…
RomanMatthew Jul 9, 2019
afcd519
Fixed version name and CLI reference in pdfmorph.rst
RomanMatthew Jul 9, 2019
92d28ed
Fix graph label, spelling errors, and virtual env directions
RomanMatthew Jul 9, 2019
87f5b62
Fix CLI note
RomanMatthew Jul 9, 2019
46364ae
Fix xPDFsuite comment
RomanMatthew Jul 9, 2019
9b51ea7
Fixed filenames
RomanMatthew Jul 9, 2019
9408726
Rename PDFmorph.rst to pdfmorph.rst
RomanMatthew Jul 9, 2019
2300e7c
Add link to PDFmorph in dropdown menu and fixed index pointer
RomanMatthew Jul 9, 2019
d87c500
Fixed license reference in pdfmorph.rst
RomanMatthew Jul 10, 2019
1ee2756
Update virtual environment instructions and fix typos
RomanMatthew Jul 11, 2019
13435df
Fixed structure issues
RomanMatthew Jul 16, 2019
aaa81dd
BUG: fix table - remove offending blank line
pavoljuhas Jul 16, 2019
4bc49b4
DROPME - Merge branch 'source' into pdfmorph_web
pavoljuhas Jul 16, 2019
612a7b9
MNT: remove trailing blanks
pavoljuhas Jul 16, 2019
76f0294
Update installation section
RomanMatthew Jul 18, 2019
54417fd
Update installation instructions
RomanMatthew Jul 18, 2019
ea9dcec
Drop unused include of abbreviations
pavoljuhas Jul 18, 2019
13c79ea
pdfmorph - typo and small rewording
pavoljuhas Jul 18, 2019
02628b0
MNT: clean up trailing blanks
pavoljuhas Jul 18, 2019
e5bccef
pdfmorph - remove conda environment creation
pavoljuhas Jul 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _templates/menu01.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<li><a href="{{pathto('products/SrMise')}}">SrMise</a></li>
<li><a href="{{pathto('products/mPDF')}}">mPDF</a></li>
<li><a href="{{pathto('products/xinterpdf')}}">xINTERPDF</a></li>
<li><a href="{{pathto('products/pdfmorph')}}">PDFmorph</a></li>
<li><a href="{{pathto('products/pythonpackages')}}">Python Packages</a></li>
</ul>
</li>
Binary file added images/pdfmorph_nacl_ex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ centered at Columbia University and, before that, Michigan State University.
products/SrMise
products/mPDF
products/xinterpdf
products/pdfmorph
142 changes: 142 additions & 0 deletions products/pdfmorph.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
.. include:: ../abbreviations.txt

########
PDFmorph
########

Overview
========

.. note::

PDFmorph is currently run from the command line, which requires
opening and typing into a terminal window or Windows command
prompt. It is recommended that you consult online resources and
become somewhat familiar before using PDFmorph.

PDFmorph is a Python software package designed to increase the insight
researchers can obtain from measured atomic pair distribution functions
(PDFs) in a model-independent way. The program was designed to help a
researcher answer the question: "Has my material undergone a phase
transition between these two measurements?"

PDFmorph makes use of several data manipulation techniques to correct
for benign effects such as thermal expansion (peak shift) and increased
thermal motion (peak broadening) or a cahnge in scale due to differences
in incident flux, for example. PDFmorph will do its best to correct
for these benign effects before computing and plotting a difference
curve.

One PDF (typically that collected at higher temperature) is identified
as the "target" PDF and the second is "morphed" by "stretching" (changing
the r-axis to simulate a uniform lattice expansion), "smearing"
(broadening peaks through a uniform convolution to simulate increased
thermal motion), and "scaling" (self-explanatory). PDFmorph will vary
amplitude of morphing transformations to obtain the best fit between
morphed and target PDFs, then plot them along with the difference curve
plotted below.

There are also a few other morphing transformations in the program.

Finally, we note that PDFmorph should work on other spectra that are
not PDFs, though it has not been extensively tested beyond the PDF.

.. PDFmorph will soon be included in :doc:`xPDFsuite <xPDFsuite>`, a powerful end-to-end software for X-ray PDF analysis. xPDFsuite is designed for flexible, high throughput PDF analyses and contains many features for interrogating, comparing, and modeling data as well as simply doing data reduction.

.. figure:: ../images/pdfmorph_nacl_ex.png
:align: center

Transformation techniques (scale, smear, and stretch, respectively)
utilized by PDFmorph applied sequentially on an NaCl sample


Installation
============

By downloading and using this software, you are agreeing to the conditions
specified in the :doc:`software license <pdfmorph_license>`.

In order to take automatically take care of software dependency
RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved
downloads, we recomment you install PDFmorph using conda. To do that,
you will first have to download and install *Anaconda* or *mini-conda*
from `continuum <https://www.continuum.io>`__.

PDFmorph is available for all operating systems supported by Anaconda,
RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved
namely for 32 and 64-bit Linux, Mac OS X, and 32 and 64-bit Windows.

.. note::
We recommend that you run PDFmorph in a Python 3 conda virtual
environment. With Anaconda or mini-conda installed on your system,
first create the virtual environment by typing ::

conda create --name=<env_name> python=3

You can give the environment any name you like but it should
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the python=3 ensures it will have python 3 installed so remove "but it should have some Python version 3 installed (though PDFmorph also works on Python 2.7)." This is just confusing.

Probably the best is at the top say "PDFmorph will run on python 3 and also python 2.7 or higher, but we recommend.....virtual environment. Here we give instructions for installing the python 3 version. With Anaconda...."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to drop instructions for creating new environment, it is not really needed as pdfmorph is quite lightweight package.

Perhaps the installation instructions should be

conda install --channel=diffpy diffpy.pdfmorph

or if you use conda-forge

conda install --channel=conda-forge diffpy.pdfmorph

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its for novice users who are not familiar with conda. Maybe start this section out from right below the license information:

"PDFmorph is distribute and is best installed using conda. It should run in most python 3 conda environments and can be directly installed in an existing environment (using the commands listed below). If you do not currently have conda installed, here are some lightweight instructions for getting started:

  1. download and install Anaconda or mini-conda from continuum <https://www.continuum.io>__."
  2. create a python 3 environment with the command
conda create --name=<env_name> python=3

where you can give the environment any name you like.

You only need to create the environment once,
but every time you want to use PDFmorph you will have to
reactivate the environment in which it is installed by typing ::

...and so on

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simon could you guve the new version a look?

have some Python version 3 installed (though PDFmorph also works
on Python 2.7). You only need to create the environment once,
but every time you want to use PDFmorph you will have to
reactivate the environment in which it is installed by typing ::
RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved

source activate <env_name>

on Mac/Linux, or ``activate <env_name>`` on Windows.

Once you're in your desired conda environment, you can install PDFmorph
from either the ``diffpy`` or ``conda-forge`` channels of Anaconda packages
by running opening a *Terminal* window or *Anaconda Command Prompt*
RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved
on Windows and using the :program:`conda` command ::

conda config --add channels conda-forge
conda install diffpy.pdfmorph

If you prefer to install from the diffpy channel, simply replace
``conda-forge`` with ``diffpy`` in the commands above.

By then it should be installed! To make sure that installation has
completed correctly, run the following command from your PDFmorph-equipped
conda environment ::

pdfmorph --version

This command should return the version of PDFmorph you have on your
machine.


PDFmorph Updates
================

The Anaconda package system makes it easy to prepare and distribute
software packages and bugfixes. To update the latest version of PDFmorph,
use ::

conda update diffpy.pdfmorph

With other Python distributions, the program can be updated to the
latest version with ::

easy_install --upgrade diffpy.pdfmorph

To use a development version, visit the project source repository at
https://github.com/diffpy/diffpy.pdfmorph and consult its README file.


Documentation/Help
==================

0.1.0 - latest
----------------------

RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved
* User manual (available in HTML and PDF)
* Installation instructions
* `Sample PDF files <https://github.com/diffpy/diffpy.pdfmorph/tree/master/tests/testdata>`__
* Tutorial
* Please, join the :doc:`community forum <../community>` for tips,
tricks, and feedback.


.. References// # update upon paper resease

.. toctree::
:hidden:

pdfmorph_license
6 changes: 6 additions & 0 deletions products/pdfmorph_license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. This page only contains the LICENSE text for PDFmorph

.. title:: PDFmorph License

.. literalinclude:: pdfmorph_license.txt
RomanMatthew marked this conversation as resolved.
Show resolved Hide resolved
:language: text
36 changes: 36 additions & 0 deletions products/pdfmorph_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This program is part of the DiffPy open-source project at Columbia
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to connect directly to the license file in the package top level directory? This would be more robust/maintainable than having two license files hanging around. What if they are different? Which one is the correct one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to connect directly to the license file in the package top level directory? This would be more robust/maintainable than having two license files hanging around. What if they are different?

For diffpy-cmi packages I use a dedicated license branch at
https://github.com/diffpy/diffpy-release/tree/license.
I make any text updates in the "license" branch and merge it to each package just before release, e.g., here.

Perhaps we could add a new license-pdfmorph branch to the "diffpy-release" repo and keep on merging it to this webpage sources and to the "diffpy.pdfmorph" master as well. If license files come from a common upstream branch, they will stay in sync.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something that would be top-priority upon release?

University and is available subject to the conditions and terms laid
out below.

Copyright © 2009-2019, Trustees of Columbia University in the City of
New York, all rights reserved.

For more information please visit the diffpy web-page at
http://diffpy.org or email Prof. Simon Billinge at [email protected].

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.

* The name of COLUMBIA UNIVERSITY nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 changes: 6 additions & 2 deletions products/pythonpackages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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.
mPDF, and PDFmorph, all of the packages listed below are bundled in the
|DiffPyCMI| release.

====================== ============================================
Module Description
Expand Down Expand Up @@ -37,11 +37,15 @@ Module Description

`diffpy.mpdf`_ Tools for calculating and refining magnetic
PDFs.

`diffpy.pdfmorph`_ Tools for comparing and manipulating two
PDFs.
====================== ============================================

.. URL definitions below -----------------------------------------------

.. _diffpy.srmise: https://github.com/diffpy/diffpy.srmise
.. _diffpy.pdffit2: https://github.com/diffpy/diffpy.pdffit2
.. _diffpy.pdfmorph: https://github.com/diffpy/diffpy.pdfmorph

.. include:: ../abbreviations.txt