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
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The rules for this file:

* The new mrc module correctly reorients the coordinate system based
on mapc, mapr, maps and correctly calculates the origin (issue #76)
* documented Grid attributes, including axis convention (issue #69)

Deprecations

Expand Down
10 changes: 1 addition & 9 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,5 @@ the `GridDataFormats repository on GitHub`_ and submit a pull request. Participa
installation
gridData/overview
gridData/basic
gridData/formats
gridData/core


.. rubric:: Indices and tables

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

gridData/formats
46 changes: 27 additions & 19 deletions gridData/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Released under the GNU Lesser General Public License, version 3 or later.
# See the files COPYING and COPYING.LESSER for details.

"""
:mod:`gridData` -- Handling grids of data
=========================================
r"""
Handling grids of data --- :mod:`gridData`
==========================================

Overview
--------
Expand All @@ -18,9 +18,10 @@
coordinates of the intersections of the grid (mesh) lines on the
axes. In this way the grid is anchored in space.

The :class:`~gridData.core.Grid` object can be resampled at arbitrary resolution (by
interpolating the data). Standard algebraic operations are defined for
grids on a point-wise basis (same as for :class:`numpy.ndarray`).
The :class:`~gridData.core.Grid` object can be resampled at arbitrary
resolution (by interpolating the data). Standard algebraic operations
are defined for grids on a point-wise basis (same as for
:class:`numpy.ndarray`).


Description
Expand All @@ -44,25 +45,26 @@

:class:`~gridData.core.Grid` objects have some convenient properties:

* The data is represented as a :class:`numpy.ndarray` and thus shares
all the advantages coming with this sophisticated and powerful
library.
* The data is represented as a :class:`numpy.ndarray` in
:attr:`Grid.grid<~gridData.core.Grid.grid>` and thus can be directly
manipulated with all the tools available in NumPy.

* They can be manipulated arithmetically, e.g. one can simply add or
subtract two of them and get another one, or multiply by a
constant. Note that all operations are defined point-wise (see the
:mod:`numpy` documentation for details) and that only grids defined
on the same cell edges can be combined.
* :class:`Grid` instances can be manipulated arithmetically, e.g. one
can simply add or subtract two of them and get another one, or
multiply by a constant. Note that all operations are defined
point-wise (see the :mod:`numpy` documentation for details) and that
only grids defined on the same cell edges can be combined.

* A :class:`~gridData.core.Grid` object can also be created from within python code
e.g. from the output of the :func:`numpy.histogramdd` function.
* A :class:`~gridData.core.Grid` object can also be created from
within python code e.g. from the output of the
:func:`numpy.histogramdd` function.

* The representation of the data is abstracted from the format that
the files are saved in. This makes it straightforward to add
additional readers for new formats.

* The data can be written out again in formats that are understood by
other programs such as VMD or PyMOL.
other programs such as VMD_, ChimeraX_ or PyMOL_.


Reading grid data files
Expand Down Expand Up @@ -96,15 +98,21 @@
For the available file formats see :ref:`supported-file-formats`.


.. _VMD: https://www.ks.uiuc.edu/Research/vmd/

.. _PyMOL: https://pymol.org/

.. _ChimeraX: https://www.cgl.ucsf.edu/chimerax/

"""

from .core import Grid
from . import OpenDX
from . import gOpenMol
from . import CCP4
from . import mrc
from . import CCP4 # remove in 0.8.0

__all__ = ['Grid', 'OpenDX', 'gOpenMol', 'CCP4']
__all__ = ['Grid', 'OpenDX', 'gOpenMol', 'mrc', 'CCP4']

from ._version import get_versions
__version__ = get_versions()['version']
Expand Down
Loading