Exemple #1
0
 def serve_trackerdata_callback(self, request):
     if (len(self.detector.intensities)>0):
         title1      = 'Intensities'
         title2      = 'Diffs'
         diffs = self.detector.diff #np.zeros(len(self.detector.intensities))
         abscissa = np.linspace(self.params['gui'][self.name]['angle_lo'], self.params['gui'][self.name]['angle_hi'], len(self.detector.intensities))
         abscissa -= self.angleBodypart_b
         abscissa *= self.sense
 
         markersH = self.state.angles
         markersV = self.state.gradients#[self.params[self.name]['threshold']]
         
             
         rv = SrvTrackerdataResponse(self.color, title1, title2, abscissa, self.detector.intensities, diffs, markersH, markersV)
     else:
         rv = SrvTrackerdataResponse()
         
     return rv
Exemple #2
0
 def serve_trackerdata_callback(self, request):
     title1      = 'Intensities'
     title2      = 'Diffs'
     intensities = list(self.detector.intensities)
     diffs       = list(np.abs(self.detector.diffs))
     abscissa    = range(len(intensities)) #range(self.params['gui'][self.name]['radius_inner'], self.params['gui'][self.name]['radius_inner'] + len(intensities))
     markersH    = [self.iRadius] #self.state.radii
     markersV    = [self.params[self.name]['threshold']]
     
     return SrvTrackerdataResponse(self.color, title1, title2, abscissa, intensities, diffs, markersH, markersV)
Exemple #3
0
    def serve_trackerdata_callback(self, request):
        title1      = 'Intensities'
        title2      = 'Diffs'
        abscissa = np.linspace(self.params['gui'][self.name]['angle_lo'], self.params['gui'][self.name]['angle_hi'], len(self.detector.intensities))
        
            
        angles = []
        gradients = []
        for i in range(len(self.state.angles)):
            angle = self.state.angles[i]
            gradient = self.state.gradients[i]
            angle_b = ((self.transform_angle_b_from_p(angle) + np.pi) % (2*np.pi)) - np.pi
            angles.append(angle_b)
            gradients.append(gradient)

        return SrvTrackerdataResponse(self.color, title1, title2, abscissa, self.detector.intensities, self.detector.diff, angles, gradients)