Exemplo n.º 1
0
 def plot_rings(self, polar_max=None):
     if polar_max is None:
         polar_max = self.refine.polar_max
     peaks = self.refine.calculate_rings(polar_max)
     plotview = get_plotview()
     plotview.vlines(peaks, colors='r', linestyles='dotted')
     plotview.draw()
Exemplo n.º 2
0
 def plot_rings(self, polar_max=None):
     if polar_max is None:
         polar_max = self.refine.polar_max
     peaks = self.refine.calculate_rings(polar_max)
     plotview = get_plotview()
     plotview.vlines(peaks, colors='r', linestyles='dotted')
     plotview.draw()
Exemplo n.º 3
0
 def plot_peaks(self, x, y):
     try:
         polar_angles, azimuthal_angles = self.refine.calculate_angles(x, y)
         if polar_angles[0] > polar_angles[-1]:
             polar_angles = polar_angles[::-1]
             azimuthal_angles = azimuthal_angles[::-1]
         azimuthal_field = NXfield(azimuthal_angles, name='azimuthal_angle')
         azimuthal_field.long_name = 'Azimuthal Angle'
         polar_field = NXfield(polar_angles, name='polar_angle')
         polar_field.long_name = 'Polar Angle'
         plotview = get_plotview()
         plotview.plot(NXdata(azimuthal_field, polar_field, title='Peak Angles'))
     except NeXusError as error:
         report_error('Plotting Lattice', error)
Exemplo n.º 4
0
 def plot_peaks(self, x, y):
     try:
         polar_angles, azimuthal_angles = self.refine.calculate_angles(x, y)
         if polar_angles[0] > polar_angles[-1]:
             polar_angles = polar_angles[::-1]
             azimuthal_angles = azimuthal_angles[::-1]
         azimuthal_field = NXfield(azimuthal_angles, name='azimuthal_angle')
         azimuthal_field.long_name = 'Azimuthal Angle'
         polar_field = NXfield(polar_angles, name='polar_angle')
         polar_field.long_name = 'Polar Angle'
         plotview = get_plotview()
         plotview.plot(
             NXdata(azimuthal_field, polar_field, title='Peak Angles'))
     except NeXusError as error:
         report_error("Plotting Lattice", error)
Exemplo n.º 5
0
 def plot_peaks(self):
     try:
         x, y = (self.refine.xp[self.refine.idx],
                 self.refine.yp[self.refine.idx])
         polar_angles, azimuthal_angles = self.refine.calculate_angles(x, y)
         if polar_angles[0] > polar_angles[-1]:
             polar_angles = polar_angles[::-1]
             azimuthal_angles = azimuthal_angles[::-1]
         azimuthal_field = NXfield(azimuthal_angles, name='azimuthal_angle')
         azimuthal_field.long_name = 'Azimuthal Angle'
         polar_field = NXfield(polar_angles, name='polar_angle')
         polar_field.long_name = 'Polar Angle'
         plotview = get_plotview()
         plotview.plot(NXdata(azimuthal_field,
                              polar_field,
                              title=f'{self.refine.name} Peak Angles'),
                       xmax=self.get_polar_max())
     except NeXusError as error:
         report_error('Plotting Lattice', error)
Exemplo n.º 6
0
 def plot_rings(self):
     plotview = get_plotview()
     plotview.vlines(self.refine.two_thetas,
                     colors='r',
                     linestyles='dotted')
     plotview.draw()