diff options
author | Thomas White <taw@physics.org> | 2024-10-16 16:18:50 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-10-16 16:58:49 +0200 |
commit | ee0b5fb73a5c9750975a6b8f07457cc406a7eb58 (patch) | |
tree | a2a27727fd838f93f8a2a8577fa2a1bf3d42eea8 /libcrystfel | |
parent | 500cd51bef443aa69d9d09f046beadeff2872c08 (diff) |
smallcell: Move SymOpMask outside loop
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/indexers/smallcell.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libcrystfel/src/indexers/smallcell.c b/libcrystfel/src/indexers/smallcell.c index 966519a8..1c240c9f 100644 --- a/libcrystfel/src/indexers/smallcell.c +++ b/libcrystfel/src/indexers/smallcell.c @@ -414,6 +414,7 @@ int smallcell_index(struct image *image, void *mpriv) int num_peak_infos = 0; int peaks_with_matches = 0; int i; + SymOpMask *msk = new_symopmask(priv->sym); /* Loop through each peak, calculate d, then 1/d value * (based on estimate_peak_resolution from peak.c), then use match_rings @@ -439,9 +440,8 @@ int smallcell_index(struct image *image, void *mpriv) /* Looking for symmetries and creating more * PeakInfo structs with these symmetry indices */ - SymOpMask *m = new_symopmask(priv->sym); - special_position(priv->sym, m, h, k, l); - int n = num_equivs(priv->sym, m); + special_position(priv->sym, msk, h, k, l); + int n = num_equivs(priv->sym, msk); int y; for ( y=0; y<n; y++ ) { @@ -477,7 +477,6 @@ int smallcell_index(struct image *image, void *mpriv) peak_infos[num_peak_infos].n_neigh = 0; (num_peak_infos)++; } - free_symopmask(m); } } @@ -491,6 +490,8 @@ int smallcell_index(struct image *image, void *mpriv) "indices) is %d for %d/%d peaks\n", num_peak_infos, peaks_with_matches, npk); + free_symopmask(msk); + /* Now to connect the nodes using calculated and measured reciprocal distance */ double dtol = DIFF_TOL; |