compare objects within the numerical tolerances of their type.

Syntax

close = isclose(a, b)

Description

For an MTEX object, isclose(x, …) calls x.isclose(…). Additional positional and keyword arguments are passed to that method unchanged. Its documentation specifies the accepted inputs, units, symmetry handling and optional outputs. Consult the corresponding method for the behaviour of a particular object type.

For numeric arrays without an MTEX method, this calls numpy.isclose.

Signature

isclose(x, *args, **kwargs)

Methods it calls

embedding whether two embeddings belong to the same frame and have the same images up to atol
fibre equal when the frames are the same and h and r agree up to the symmetry of the frames within tol, both flipped counting as well
orientation equal up to the symmetry of the frames within the angular tolerance tol, between the same frames
orthogonalTransform equal within the angular tolerance tol and of one parity, MATLAB’s eq
quaternion equal within the angular tolerance tol, MATLAB’s eq
referenceFrame whether two frames may be treated as one: the same class of group and aligned bases, and for crystal frames the same mineral (MATLAB’s eqTol)
rotation equal within the angular tolerance tol, MATLAB’s eq
S1FunHarmonic whether the coefficients of g agree within atol + rtol times their norm
S2FunHarmonic whether the coefficients agree with those of g within the tolerances, relative to the norm of g
S2VectorFieldHarmonic whether two fields agree in their coefficients up to the relative tolerance rtol
SO3FunHarmonic the same coefficients up to a tolerance
SO3TangentVector equal at the same reference within tol in the components (MATLAB’s eq)
SO3VectorFieldHarmonic whether two fields have the same coefficients on one side up to the relative tolerance rtol
tensor whether two tensors of one rank and shape agree coefficientwise within rtol and atol
vector3d isclose(v, w), isclose(v, w, antipodal=True, tol=): pointing the same way up to the group of a crystal frame within the tolerance tol of the cosine, and up to sign when antipodal (MATLAB’s eq)

Used on

CrystalOperations

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/isclose_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.