@@ -1500,12 +1500,12 @@ def parent_generate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), cent
15001500 c_cart = self .xtl .Parent .Cell .calculateQ (centre )
15011501
15021502 # Generate lattice of reciprocal space points
1503- maxq = np .sqrt (q_max ** 2 + q_max ** 2 + np .sum (c_cart ** 2 )) # generate all reflections
1504- print ('Max Q distance: %4.2f A-1' % maxq )
1503+ maxq = np .sqrt (q_max ** 2 + q_max ** 2 + np .sum (c_cart ** 2 )) # generate all reflections
1504+ print ('Max Q distance: %4.2f A-1' % maxq )
15051505 hmax , kmax , lmax = fc .maxHKL (maxq , self .xtl .Cell .UVstar ())
15061506 HKL = fc .genHKL ([hmax , - hmax ], [kmax , - kmax ], [lmax , - lmax ])
1507- HKL = HKL # + centre # reflection about central reflection
1508- print ('Number of reflections in sphere: %1.0f' % len (HKL ))
1507+ HKL = HKL # + centre # reflection about central reflection
1508+ print ('Number of reflections in sphere: %1.0f' % len (HKL ))
15091509
15101510 # Determine the directions in cartesian space
15111511 x_cart = self .xtl .calculateQ_parent (x_axis )
@@ -1535,10 +1535,12 @@ def parent_generate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), cent
15351535 pHKL = self .xtl .superhkl2parent (HKLinbox )
15361536 pHKL , inten = self .xtl .Parent .Symmetry .symmetric_intensity (pHKL , inten )
15371537 HKL = self .xtl .parenthkl2super (pHKL )
1538+ print ('Adding parent symmetry domains, adding %d reflections' % (len (HKL ) - len (pHKL )))
15381539 else :
15391540 HKL = HKLinbox
15401541 q = self .xtl .calculateQ_parent (HKL )
15411542
1543+ # remove reflections not in plot
15421544 box_coord = fg .index_coordinates (q - c_cart , CELL )
15431545 incell = np .all (np .abs (box_coord ) <= 0.5 , axis = 1 )
15441546 plane_coord = 2 * q_max * box_coord [incell , :]
@@ -1661,21 +1663,26 @@ def simulate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0,
16611663 mesh_vec_b = fg .index_coordinates (Q_vec_b , CELL ) * 2 * q_max
16621664
16631665 # Vector arrows and lattice point labels
1664- cen_lab = '(%1.3g,%1.3g,%1.3g)' % (centre [0 ], centre [1 ], centre [2 ])
1665- vec_a_lab = '(%1.3g,%1.3g,%1.3g)' % (vec_a [0 ] + centre [0 ], vec_a [1 ] + centre [1 ], vec_a [2 ] + centre [2 ])
1666- vec_b_lab = '(%1.3g,%1.3g,%1.3g)' % (vec_b [0 ] + centre [0 ], vec_b [1 ] + centre [1 ], vec_b [2 ] + centre [2 ])
1666+ supx , supy , supz = 0.0 + np .around (self .xtl .parenthkl2super (centre )[0 ], 3 )
1667+ svax , svay , svaz = 0.0 + np .around (self .xtl .parenthkl2super (vec_a + centre )[0 ], 3 )
1668+ svbx , svby , svbz = 0.0 + np .around (self .xtl .parenthkl2super (vec_b + centre )[0 ], 3 )
1669+ cen_lab = '(%1.3g,%1.3g,%1.3g)$_{p}$' % (centre [0 ], centre [1 ], centre [2 ])
1670+ # cen_lab += '\n(%1.3g,%1.3g,%1.3g)$_{s}$' % (supx, supy, supz)
1671+ vec_a_lab = '(%1.3g,%1.3g,%1.3g)$_{p}$' % (vec_a [0 ] + centre [0 ], vec_a [1 ] + centre [1 ], vec_a [2 ] + centre [2 ])
1672+ vec_a_lab += '\n (%1.3g,%1.3g,%1.3g)$_{s}$' % (svax , svay , svaz )
1673+ vec_b_lab = '(%1.3g,%1.3g,%1.3g)$_{p}$' % (vec_b [0 ] + centre [0 ], vec_b [1 ] + centre [1 ], vec_b [2 ] + centre [2 ])
1674+ vec_b_lab += '\n (%1.3g,%1.3g,%1.3g)$_{s}$' % (svbx , svby , svbz )
16671675
16681676 lattQ = fp .axis_lattice_points (mesh_vec_a , mesh_vec_b , plt .axis ())
16691677 fp .plot_lattice_lines (lattQ , mesh_vec_a , mesh_vec_b , lw = 0.5 , c = 'grey' )
1670- fp .plot_vector_arrows (mesh_vec_a , mesh_vec_b , vec_a_lab , vec_b_lab )
1678+ fp .plot_vector_arrows (mesh_vec_a , mesh_vec_b , vec_a_lab , vec_b_lab , color = 'k' )
16711679 plt .text (0 - (0.2 * q_max ), 0 - (0.1 * q_max ), cen_lab , fontname = fp .DEFAULT_FONT , weight = 'bold' , size = 18 )
16721680
16731681 # Plot labels
16741682 xlab = r'Q || (%1.3g,%1.3g,%1.3g) [$\AA^{-1}$]' % (x_axis [0 ], x_axis [1 ], x_axis [2 ])
16751683 ylab = r'Q || (%1.3g,%1.3g,%1.3g) [$\AA^{-1}$]' % (y_axis [0 ], y_axis [1 ], y_axis [2 ])
1676- supercentre = self .xtl .parenthkl2super (centre )[0 ]
16771684 ttl = '%s\n (%1.3g,%1.3g,%1.3g)$_{p}$ = (%1.3g,%1.3g,%1.3g)$_{s}$' \
1678- % (self .xtl .name , centre [0 ], centre [1 ], centre [2 ], supercentre [ 0 ], supercentre [ 1 ], supercentre [ 2 ] )
1685+ % (self .xtl .name , centre [0 ], centre [1 ], centre [2 ], supx , supy , supz )
16791686 fp .labels (ttl , xlab , ylab )
16801687
16811688
0 commit comments