def _check_origin(self): for i in range(3): d = self.origin[i] if not common.is_number(d): log.error('origin[%s] must be number but got %s'%(i,type(d))) return 1 return 0
def _check_spacing(self): for i in range(3): d = self.spacing[i] if not common.is_number(d): log.error('spacing[%s] must be number but got %s'%(i,type(d))) return 1 if d<=0: log.error('spacing[%s] must be positive number but got %s'%(i,d)) return 1 return 0