diff --git a/news/90.rst b/news/90.rst new file mode 100644 index 0000000..275a9c5 --- /dev/null +++ b/news/90.rst @@ -0,0 +1,26 @@ +**Added:** + +* ``quick_index()`` now accepts a ``length_min`` parameter (default: 2.5 Å) + to control the minimum unit cell length explored during indexing. + +**Changed:** + +* ``quick_index()`` default minimum unit cell length lowered from 3 Å to 2.5 Å, + allowing correct indexing of compact structures such as α-Fe, B, or ZRNCl + (`issue #47 `_). + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/pyobjcryst/indexing.py b/src/pyobjcryst/indexing.py index 1e3251f..7a4ca1a 100644 --- a/src/pyobjcryst/indexing.py +++ b/src/pyobjcryst/indexing.py @@ -54,6 +54,7 @@ def quick_index( try_centered_lattice=True, continue_on_sol=False, max_nb_spurious=0, + length_min=2.5, verbose=True, ): if len(pl) > nb_refl: @@ -70,7 +71,7 @@ def quick_index( ) print("Starting indexing using %2u peaks" % nb) ex = CellExplorer(pl, CrystalSystem.CUBIC, 0) - ex.SetLengthMinMax(3, 25) + ex.SetLengthMinMax(length_min, 25) ex.SetAngleMinMax(deg2rad(90), deg2rad(140)) ex.SetD2Error(0) stop_score = 50 @@ -139,7 +140,7 @@ def quick_index( lengthmax = 3 * maxv ** (1 / 3.0) if lengthmax < 25: lengthmax = 25 - ex.SetLengthMinMax(3, lengthmax) + ex.SetLengthMinMax(length_min, lengthmax) ex.SetCrystalSystem(csys) ex.SetCrystalCentering(cent) if verbose: