Skip to content

Commit

Permalink
Merge pull request #11 from dnjohnstone/orix0.1.0
Browse files Browse the repository at this point in the history
Orix0.1.0
  • Loading branch information
dnjohnstone authored Sep 24, 2019
2 parents fc6f86a + 2148711 commit 3d69fe1
Show file tree
Hide file tree
Showing 23 changed files with 320 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# texpy documentation build configuration file, created by
# orix documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 20 12:05:50 2018.
#
# This file is execfile()d with the current directory set to its
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. texpy documentation master file, created by
.. orix documentation master file, created by
sphinx-quickstart on Tue Mar 20 12:05:50 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand Down
9 changes: 3 additions & 6 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Installation from source
1. Visit `the source code on GitHub <https://github.com/pyxem/orix>`_ and
download the zip file or simply click
`here <https://github.com/pyxem/orix/archive/master.zip>`_ to download
texpy as a zip file.
orix as a zip file.
2. Unzip the downloaded file to a convenient local directory.
3. Open a terminal and navigate to the top level "orix" directory.
4. Ensure you are using Python version 3.5 or higher:
Expand All @@ -73,13 +73,10 @@ Installation from source
If not, consider upgrading your python version, or start a virtual
environment with Python 3.5 or higher.

5. Install texpy:
5. Install orix:

.. code:: shell
> pip install .
This will install texpy alongside numpy and matplotlib.



This will install orix alongside numpy and matplotlib.
10 changes: 2 additions & 8 deletions docs/source/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ a work in progress, but several tools are already available. The process builds
upon the way data is plotted in `matplotlib <https://matplotlib.org/>`_.

Any plotting session will begin by importing both the matplotlib plotting API
and the texpy plotting API.
and the orix plotting API.

.. ipython::

In [1]: import matplotlib.pyplot as plt

In [2]: import texpy.plot
In [2]: import orix.plot

In [3]: %matplotlib qt5 # Setting the backend.

Expand All @@ -35,9 +35,3 @@ simplest is:
.. ipython::

In [4]: ax = plt.figure().add_subplot(111)






3 changes: 1 addition & 2 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The following code demonstrates a number of ways objects can be initialized.
<ipython-input-10-422ccfdd4ab4> in <module>()
----> 1 w = Vector3d(np.random.random((4, 4)))

~\Documents\phd\dev\texpy\texpy\base\__init__.py in __init__(self, data)
~\Documents\phd\dev\orix\orix\base\__init__.py in __init__(self, data)
41 self.data = data
42 if data.shape[-1] != self.dim:
---> 43 raise DimensionError(self)
Expand Down Expand Up @@ -244,4 +244,3 @@ Most orix objects are mathematical.

For a complete description of each object's mathematical properties, refer
to the full :doc:`api`.

2 changes: 1 addition & 1 deletion orix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
__version__ = "0.1.0"
__author__ = "Ben Martineau"
__author_email__ = "[email protected]"
__description__ = "Spatially-resolved quaternion, rotation, orientation handling in Python, developed for texture analysis."
__description__ = "Orientation, rotation, quaternion, and crystal symmetry handling in Python."
18 changes: 18 additions & 0 deletions orix/base/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

import numpy as np


Expand Down
20 changes: 19 additions & 1 deletion orix/grid/s1grid.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

import numpy as np


Expand All @@ -14,4 +32,4 @@ def minimum(self):

@property
def maximum(self):
return np.max(self.points)
return np.max(self.points)
18 changes: 18 additions & 0 deletions orix/grid/s2grid.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

import numpy as np
from orix.vector import Vector3d
from orix.grid.s1grid import S1Grid
Expand Down
18 changes: 18 additions & 0 deletions orix/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Load and save utilities.
.. warning::
Expand Down
20 changes: 19 additions & 1 deletion orix/objects.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

from orix.quaternion.orientation import Orientation, Misorientation
from orix.vector.neo_euler import *
from orix.vector.neo_euler import *
20 changes: 19 additions & 1 deletion orix/plot/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
from .rotation_plot import RodriguesPlot
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

from .rotation_plot import RodriguesPlot
18 changes: 18 additions & 0 deletions orix/plot/rotation_plot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

from matplotlib import projections
from mpl_toolkits.mplot3d import Axes3D
from orix.vector.neo_euler import Rodrigues, AxAngle
Expand Down
18 changes: 18 additions & 0 deletions orix/quaternion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Four-dimensional objects.
In a simplified sense, quaternions are an extension of the concept of complex
Expand Down
18 changes: 18 additions & 0 deletions orix/quaternion/orientation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Rotations respecting symmetry.
An orientation is simply a rotation with respect to some reference frame. In
Expand Down
18 changes: 18 additions & 0 deletions orix/quaternion/orientation_region.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""An orientation region is some subset of the complete space of orientations.
The complete orientation space represents every possible orientation of an
Expand Down
18 changes: 18 additions & 0 deletions orix/quaternion/rotation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Point transformations of objects.
Rotations are transformations of three-dimensional space leaving the
Expand Down
18 changes: 18 additions & 0 deletions orix/quaternion/symmetry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Collections of transformations representing a symmetry group.
An object's symmetry can be characterized by the transformations relating
Expand Down
20 changes: 19 additions & 1 deletion orix/scalar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2019 The pyXem developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# orix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with orix. If not, see <http://www.gnu.org/licenses/>.

"""Dimensionless quantities.
As well as themselves representing physical quantities, Scalars
Expand Down Expand Up @@ -201,4 +219,4 @@ def reshape(self, *args):

def flatten(self):
"""Scalar : A new object with the same data in a single column."""
return self.__class__(self.data.T.flatten())
return self.__class__(self.data.T.flatten())
Loading

0 comments on commit 3d69fe1

Please sign in to comment.