@@ -68,9 +68,9 @@ def __init__(self, x_aper=None, y_aper=None, dx=None, dy=None, xg=None, yg=None,
6868
6969 print 'PyPIC Version 2.2.6'
7070
71- if xg != None and yg != None :
72- assert (x_aper == None and y_aper == None and dx == None and dy == None )
73- assert (x_min == None and x_max == None and y_min == None and y_max == None )
71+ if xg is not None and yg is not None :
72+ assert (x_aper is None and y_aper is None and dx is None and dy is None )
73+ assert (x_min is None and x_max is None and y_min is None and y_max is None )
7474
7575 Nxg = len (xg );
7676 bias_x = min (xg );
@@ -81,20 +81,20 @@ def __init__(self, x_aper=None, y_aper=None, dx=None, dy=None, xg=None, yg=None,
8181 dx = xg [1 ]- xg [0 ]
8282 dy = yg [1 ]- yg [0 ]
8383
84- elif dx != None and dy != None :
85- assert (xg == None and yg == None )
84+ elif dx is not None and dy is not None :
85+ assert (xg is None and yg is None )
8686 # box given
87- if x_min != None and x_max != None and y_min != None and y_max != None :
88- assert (x_aper == None and y_aper == None )
87+ if x_min is not None and x_max is not None and y_min is not None and y_max is not None :
88+ assert (x_aper is None and y_aper is None )
8989
9090 x_aper = (x_max - x_min )/ 2.
9191 x_center = (x_max + x_min )/ 2.
9292
9393 y_aper = (y_max - y_min )/ 2.
9494 y_center = (y_max + y_min )/ 2.
9595 # aperture given
96- elif x_aper != None and y_aper != None :
97- assert (x_min == None and x_max == None and y_min == None and y_max == None )
96+ elif x_aper is not None and y_aper is not None :
97+ assert (x_min is None and x_max is None and y_min is None and y_max is None )
9898
9999 x_center = 0.
100100 y_center = 0.
0 commit comments