Skip to content

Commit 8aa8846

Browse files
authored
Indexing fix
Fixes error for map generation with incomplete rings and a branch cut.
1 parent bbad529 commit 8aa8846

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hexrd/instrument.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,11 @@ def extract_polar_maps(self, plane_data, imgser_dict,
554554
# remap
555555
retas = mapAngle(retas, new_period)
556556
tmp_bins = mapAngle(eta_edges[reta_idx], new_period)
557-
reta_idx = np.argsort(tmp_bins)
557+
tmp_idx = np.argsort(tmp_bins)
558+
reta_idx = reta_idx[np.argsort(tmp_bins)]
558559
eta_bins = np.hstack(
559-
[tmp_bins[reta_idx],
560-
tmp_bins[reta_idx][-1] + delta_eta]
560+
[tmp_bins[tmp_idx],
561+
tmp_bins[tmp_idx][-1] + delta_eta]
561562
)
562563
pass
563564
pass

0 commit comments

Comments
 (0)