5555 mapAngle , \
5656 oscillAnglesOfHKLs , \
5757 rowNorm , \
58- validateAngleRanges
58+ unitRowVector
5959from hexrd .xrd import xrdutil
6060from hexrd .xrd .crystallography import PlaneData
6161from hexrd import constants as ct
@@ -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
@@ -600,7 +601,7 @@ def extract_line_positions(self, plane_data, imgser_dict,
600601 tth_ranges = np .degrees (plane_data .getMergedRanges ()[1 ])
601602 tth_tols = np .vstack ([i [1 ] - i [0 ] for i in tth_ranges ])
602603 else :
603- tth_tols = np .ones (len (plane_data ))* tth_tol
604+ tth_tols = np .ones (len (plane_data ))* tth_tol
604605
605606 # =====================================================================
606607 # LOOP OVER DETECTORS
@@ -624,7 +625,8 @@ def extract_line_positions(self, plane_data, imgser_dict,
624625
625626 # make rings
626627 pow_angs , pow_xys = panel .make_powder_rings (
627- plane_data , merge_hkls = True , delta_tth = tth_tol , delta_eta = eta_tol )
628+ plane_data , merge_hkls = True ,
629+ delta_tth = tth_tol , delta_eta = eta_tol )
628630
629631 # =================================================================
630632 # LOOP OVER RING SETS
@@ -681,7 +683,7 @@ def extract_line_positions(self, plane_data, imgser_dict,
681683 ims_data = []
682684 for j_p in np .arange (len (images )):
683685 # catch interpolation type
684- image = images [j_p ]
686+ image = images [j_p ]
685687 if do_interpolation :
686688 tmp = panel .interpolate_bilinear (
687689 xy_eval ,
@@ -1552,13 +1554,13 @@ def clip_to_panel(self, xy, buffer_edges=True):
15521554 )
15531555 on_panel = np .logical_and (on_panel_x , on_panel_y )
15541556 elif not buffer_edges :
1555- on_panel_x = np .logical_and (
1556- xy [:, 0 ] >= - xlim , xy [:, 0 ] <= xlim
1557- )
1558- on_panel_y = np .logical_and (
1559- xy [:, 1 ] >= - ylim , xy [:, 1 ] <= ylim
1560- )
1561- on_panel = np .logical_and (on_panel_x , on_panel_y )
1557+ on_panel_x = np .logical_and (
1558+ xy [:, 0 ] >= - xlim , xy [:, 0 ] <= xlim
1559+ )
1560+ on_panel_y = np .logical_and (
1561+ xy [:, 1 ] >= - ylim , xy [:, 1 ] <= ylim
1562+ )
1563+ on_panel = np .logical_and (on_panel_x , on_panel_y )
15621564 return xy [on_panel , :], on_panel
15631565
15641566 def cart_to_angles (self , xy_data ):
@@ -1743,7 +1745,7 @@ def make_powder_rings(
17431745 eta_centers = eta_edges [:- 1 ] + del_eta
17441746
17451747 # !!! get chi and ome from rmat_s
1746- chi = np .arctan2 (rmat_s [2 , 1 ], rmat_s [1 , 1 ])
1748+ # chi = np.arctan2(rmat_s[2, 1], rmat_s[1, 1])
17471749 ome = np .arctan2 (rmat_s [0 , 2 ], rmat_s [0 , 0 ])
17481750
17491751 # make list of angle tuples
0 commit comments