diff --git a/.zenodo.json b/.zenodo.json
index 61795a30..9b81059b 100644
--- a/.zenodo.json
+++ b/.zenodo.json
@@ -46,6 +46,10 @@
"name": "Viljar Johan Femoen",
"affiliation": "Norwegian University of Science and Technology"
},
+ {
+ "name": "Alessandra da Silva",
+ "orcid": "0000-0003-0465-504X"
+ },
{
"name": "Alexander Clausen",
"orcid": "0000-0002-9555-7455",
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 660aeaed..5368fb05 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,26 +6,16 @@ All user facing changes to this project are documented in this file. The format
on `Keep a Changelog `__, and this project tries
its best to adhere to `Semantic Versioning `__.
-Unreleased
-==========
-
-Added
------
-
-Changed
--------
-
-Removed
--------
-
-Deprecated
-----------
+2024-04-21 - version 0.12.1
+===========================
Fixed
-----
- ``ax2qu`` and ``Quaternion.from_axes_angles()`` would raise if the input arrays were
broadcastable but the final dimension was ``1``. This has been fixed.
-
+- ``Phase.from_cif()`` now correctly adjusts atom positions when forcing
+ ``Phase.structure.lattice.base`` to use the crystal axes alignment ``e1 || a``,
+ ``e3 || c*``. This bug was introduced in 0.12.0.
2024-04-13 - version 0.12.0
===========================
diff --git a/orix/__init__.py b/orix/__init__.py
index 5da4e507..c24b46a4 100644
--- a/orix/__init__.py
+++ b/orix/__init__.py
@@ -1,5 +1,5 @@
__name__ = "orix"
-__version__ = "0.13.dev0"
+__version__ = "0.12.1"
__author__ = "orix developers"
__author_email__ = "pyxem.team@gmail.com"
__description__ = "orix is an open-source Python library for handling crystal orientation mapping data."
@@ -16,5 +16,6 @@
"Carter Francis",
"Simon Høgås",
"Viljar Johan Femoen",
+ "Alessandra da Silva",
"Alexander Clausen",
]
diff --git a/orix/crystal_map/phase_list.py b/orix/crystal_map/phase_list.py
index cf36dd27..db99ab97 100644
--- a/orix/crystal_map/phase_list.py
+++ b/orix/crystal_map/phase_list.py
@@ -339,9 +339,6 @@ def from_cif(cls, filename: str) -> Phase:
parser = p_cif.P_cif()
name = os.path.splitext(os.path.split(filename)[1])[0]
structure = parser.parseFile(filename)
- lattice = structure.lattice
- new_base = _new_structure_matrix_from_alignment(lattice.base, x="a", z="c*")
- lattice.setLatBase(new_base)
space_group = parser.spacegroup.number
return cls(name, space_group, structure=structure)
diff --git a/orix/tests/test_phase_list.py b/orix/tests/test_phase_list.py
index 78b8c6ad..5e3782bf 100644
--- a/orix/tests/test_phase_list.py
+++ b/orix/tests/test_phase_list.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with orix. If not, see .
-from diffpy.structure import Atom, Lattice, Structure
+from diffpy.structure import Atom, Lattice, Structure, loadStructure
from diffpy.structure.spacegroups import GetSpaceGroup
import numpy as np
import pytest
@@ -396,6 +396,13 @@ def test_from_cif(self, cif_file):
lattice.base, [[15.5, 0, 0], [0, 4.05, 0], [-1.779, 0, 6.501]], atol=1e-3
)
+ def test_from_cif_same_structure(self, cif_file):
+ phase1 = Phase.from_cif(cif_file)
+ structure = loadStructure(cif_file)
+ phase2 = Phase(structure=structure)
+ assert np.allclose(phase1.structure.lattice.base, phase2.structure.lattice.base)
+ assert np.allclose(phase1.structure.xyz, phase2.structure.xyz)
+
class TestPhaseList:
@pytest.mark.parametrize("empty_input", [(), [], {}])