Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
121 changes: 121 additions & 0 deletions products/Utils_LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
OPEN SOURCE LICENSE AGREEMENT
=============================

Copyright (c) 1989, 1991 Free Software Foundation, Inc.
Copyright (c) 2006, The Regents of the University of California through Lawrence Berkeley National Laboratory
Copyright (c) 2006-2007, Board of Trustees of Michigan State University
Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New York
Copyright (c) 2009-2011, University of Tennessee
Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP")
Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory
Copyright (c) 2019-2024, The Trustees of Columbia University in the City of New York.
All rights reserved.

The "DiffPy-CMI" is distributed subject to the following license conditions:

SOFTWARE LICENSE AGREEMENT

Software: DiffPy-CMI

(1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either
source code, or binary form and accompanying documentation).

Part of the software was derived from the DANSE, ObjCryst++ (with permission),
PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of
which the original Copyrights are contained in each individual file.

Each licensee is addressed as "you" or "Licensee."

(2) The copyright holders shown above and their third-party Licensors hereby
grant licensee a royalty-free nonexclusive license, subject to the limitations
stated herein and U.S. Government license rights.

(3) You may modify and make a copy or copies of the software for use within
your organization, if you meet the following conditions:

(a) Copies in source code must include the copyright notice and this
software license agreement.

(b) Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other materials
provided with the copy.

(4) You may modify a copy or copies of the Software or any portion of it, thus
forming a work based on the Software, and distribute copies of such work
outside your organization, if you meet all of the following conditions:

(a) Copies in source code must include the copyright notice and this
Software License Agreement;

(b) Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other materials
provided with the copy;

(c) Modified copies and works based on the Software must carry prominent
notices stating that you changed specified portions of the Software;

(d) Neither the name of Brookhaven Science Associates or Brookhaven
National Laboratory nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
written permission.

(5) Portions of the Software resulted from work developed under a U.S.
Government contract and are subject to the following license:
The Government is granted for itself and others acting on its behalf a
paid-up, nonexclusive, irrevocable worldwide license in this computer software
to reproduce, prepare derivative works, and perform publicly and display
publicly.

(6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT
WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY
LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL
LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF
THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE
PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.

(7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR
THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING
BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER,
WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING
NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS
BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.

Brookhaven National Laboratory Notice
=====================================

Acknowledgment of sponsorship
-----------------------------

This software was produced by the Brookhaven National Laboratory, under
Contract DE-AC02-98CH10886 with the Department of Energy.

Government disclaimer of liability
----------------------------------

Neither the United States nor the United States Department of Energy, nor
any of their employees, makes any warranty, express or implied, or assumes
any legal liability or responsibility for the accuracy, completeness, or
usefulness of any data, apparatus, product, or process disclosed, or
represents that its use would not infringe privately owned rights.

Brookhaven disclaimer of liability
----------------------------------

Brookhaven National Laboratory makes no representations or warranties,
express or implied, nor assumes any liability for the use of this software.

Maintenance of notice
---------------------

In the interest of clarity regarding the origin and status of this
software, Brookhaven National Laboratory requests that any recipient of it
maintain this notice affixed to any distribution by the recipient that
contains a copy or derivative of this software.

END OF LICENSE
6 changes: 6 additions & 0 deletions products/Utilslicense.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. this page only contains the LICENSE text for Utils

.. title:: Utils License

.. literalinclude:: Utils_LICENSE.txt
:language: text
126 changes: 126 additions & 0 deletions products/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
##########
Utils
##########

.. include:: ../abbreviations.txt

General utilities for analyzing diffraction data

The diffpy.utils package provides a number of functions and classes designed to help
researchers analyze their diffraction data. It also includes some functionality for
carrying out PDF analysis. Examples are parsers for reading common format diffraction
data files, ``DiffractionObjects`` that allow you to do algebra on diffraction patterns,
tools for better capture and propagation of metadata,
diffraction-friendly interpolation routines, as well as some other tools used across
diffpy libraries.


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


Citation
--------

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

P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge,
`Complex modeling: a strategy and software program for combining
multiple information sources to solve ill posed structure and
nanostructure inverse problems
<http://dx.doi.org/10.1107/S2053273315014473>`__,
*Acta Crystallogr. A* **71**, 562-568 (2015).

Documentation
-------------

Documentation may be found at, https://diffpy.github.io/diffpy.utils

Installation
------------

The preferred method is to use `Miniconda Python
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
and install from the "conda-forge" channel of Conda packages.

To add "conda-forge" to the conda channels, run the following in a terminal. ::

conda config --add channels conda-forge

We want to install our packages in a suitable conda environment.
The following creates and activates a new environment named ``diffpy.utils_env`` ::

conda create -n diffpy.utils_env diffpy.utils
conda activate diffpy.utils_env

To confirm that the installation was successful, type ::

python -c "import diffpy.utils; print(diffpy.utils.__version__)"

The output should print the latest version displayed on the badges above.

If the above does not work, you can use ``pip`` to download and install the latest release from
`Python Package Index <https://pypi.python.org>`_.
To install using ``pip`` into your ``diffpy.utils_env`` environment, type ::

pip install diffpy.utils

If you prefer to install from sources, after installing the dependencies, obtain the source archive from
`GitHub <https://github.com/diffpy/diffpy.utils/>`_. Once installed, ``cd`` into your ``diffpy.utils`` directory
and run the following ::

pip install .

Getting Started
---------------

You may consult our `online documentation <https://diffpy.github.io/diffpy.utils>`_ for tutorials and API references.

Support and Contribute
----------------------

`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.utils. Please join the diffpy.utils users community by joining the Google group. The diffpy.utils project welcomes your expertise and enthusiasm!

If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.utils/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.utils/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.

Feel free to fork the project and contribute. To install diffpy.utils
in a development mode, with its sources being directly used by Python
rather than copied to a package directory, use the following in the root
directory ::

pip install -e .

To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
hooks.

1. Install pre-commit in your working environment by running ``conda install pre-commit``.

2. Initialize pre-commit (one time only) ``pre-commit install``.

Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
trying to commit again.

Improvements and fixes are always appreciated.

Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.utils/blob/main/CODE-OF-CONDUCT.rst>`_.

Contact
-------

For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at sb2896@columbia.edu.


What next?
============

Explore the SrMise
`tutorial <https://www.diffpy.org/diffpy.utils/>`_!

.. toctree::
:hidden:

Utilslicense