예제 #1
0
 def __init__(self,pt = 0.0 ,xsize = 36.00, ysize = 24.0):
     """
     Constuctor with
     param pt Poistion or float, the plane position
     param xsize float xsize of plane (defaults to 36mm)
     param ysize float ysize of plane (defaults to 24 mm)
     """
     ImagePlane.__init__(self,pt,xsize,ysize)
     self.targets = []                 # List of targets
     self.wavelength = Default
예제 #2
0
 def __init__(self,pt = None,xsize = 200.0, ysize = 200.0, xpixel_or_im = 256, ypixel = 256):
     """
     Form the OpticalImage with either blank array of nmpy image array
     param pt the plane point (default = None,(0,0,0))
     param xsize xsize of plane in mm (default = 200.0mm)
     param ysize ysize of plane in mm (default = 200.0mm)
     param xpixel_or_im x-pixel size of image (default = 256) OR nmpy array of floats
     param ypixel y-pixel size of of image (default = 256)
     """
     
     ImagePlane.__init__(self,pt,xsize,ysize)
     if isinstance(xpixel_or_im,int):
         self.image = np.zeros((xpixel_or_im,ypixel),dtype = float)
     else:
         self.image = xpixel_or_im
     self.xpixel,self.ypixel = self.image.shape       # set xpixel and ypixel from image data