Skip to content
Snippets Groups Projects
Commit 1fc70453 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

PEP8

parent 2acd50de
No related branches found
No related tags found
No related merge requests found
...@@ -568,5 +568,5 @@ class DataBaseSave(DataBase): ...@@ -568,5 +568,5 @@ class DataBaseSave(DataBase):
cmaxminrange.loc[str(chan_n) + '_max'] = cmax cmaxminrange.loc[str(chan_n) + '_max'] = cmax
cmaxminrange.loc[str(chan_n) + '_min'] = cmin cmaxminrange.loc[str(chan_n) + '_min'] = cmin
cmaxminrange.loc[str(chan_n) + '_range'] = crange cmaxminrange.loc[str(chan_n) + '_range'] = crange
check_scene(normed_im[...,np.newaxis]) check_scene(normed_im[..., np.newaxis])
return normed_im, cmaxminrange return normed_im, cmaxminrange
...@@ -324,15 +324,14 @@ is the distance. ...@@ -324,15 +324,14 @@ is the distance.
self.update(posorient) self.update(posorient)
toreturn = np.concatenate((self.image, toreturn = np.concatenate((self.image,
self.distance), axis=2) self.distance), axis=2)
ninffound=0 ninffound = 0
for chan_i in range(4): for chan_i in range(4):
cim = toreturn[...,chan_i] cim = toreturn[...,chan_i]
cmax=cim.max() cmax = cim.max()
if np.isinf(cmax): if np.isinf(cmax):
ninffound += np.sum(np.isinf(cim)) ninffound += np.sum(np.isinf(cim))
cmax=cim[np.isinf(cim)==0].max() cmax = cim[np.isinf(cim) == 0].max()
toreturn[np.isinf(cim)==1]=cmax toreturn[np.isinf(cim) == 1] = cmax
if ninffound > 0: if ninffound > 0:
warnings.warn('{} Inf found in image'.format(ninffound)) warnings.warn('{} Inf found in image'.format(ninffound))
return toreturn[..., np.newaxis] return toreturn[..., np.newaxis]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment