A method of vector3d.
the disjoint list of vectors, equal ones within a tolerance taken once
Syntax
u = unique(v)
Sorted, each vector once.
u = unique(v, tol=0.01)
A larger tolerance.
u = unique(v, antipodal=True)
V and -v the same.
u = unique(v, stable=True)
In the order of their first appearance.
u, iv, iu = unique(v, return_index=True, return_inverse=True)
U = v[iv], v = u[iu].
Description
Axes are equal up to sign; antipodal=True takes them so always, antipodal=False never. Crystal directions in a frame with symmetry are equal when they are symmetrically equivalent: they are projected to the fundamental sector first.
Input
v |
vector3d |
Keywords
| keyword | default | description |
|---|---|---|
tol |
1e-06 |
the tolerance of the coordinates within which vectors are equal |
antipodal |
None |
take the vectors as axes: True always, False never; by default where they are axes |
symmetry |
True |
take the symmetric equivalents of crystal directions into account |
stable |
False |
keep the order of the first appearances rather than sorting |
return_index |
False |
also return the indices iv of the kept vectors |
return_inverse |
False |
also return the indices iu reconstructing the list |
Output
u |
vector3d, one dimensional |
iv |
array, the indices with u = v.flat[iv], with return_index=True |
iu |
array, the indices with v.flat = u[iu], with return_inverse=True |
See also
vector3d.symmetrise, vector3d.mean
MATLAB’s Miller.unique
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/Miller.unique_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.