#NEWLINE# def query_frame( self ) : #NEWLINE# #INDENT# 'Returns a Gaussian with uniform random noise' #NEWLINE# ( width , height ) = self . resolution #NEWLINE# ( x , y ) = N . ogrid [ 0 : height , 0 : width ] #NEWLINE# ( y0 , x0 ) = self . centroid #NEWLINE# r = N . hypot ( ( x - x0 ) , ( y - y0 ) ) #NEWLINE# self . frame = N . array ( ( N . exp ( ( ( - ( r ** 2 ) ) / ( self . radius ** 2 ) ) ) * self . amplitude ) , dtype = N . uint16 ) #NEWLINE# self . frame += N . random . uniform ( low = 0 , high = self . noise_amplitude , size = ( height , width ) ) #NEWLINE# time . sleep ( ( 1.0 / self . frame_rate ) )