Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh13 committed Dec 19, 2024
1 parent 674e2d6 commit 3b6ff9d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions hexrdgui/scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,25 @@ def none(x):

def sqrt(x):
if isinstance(x, np.ma.masked_array):
return np.sqrt(x.filled(np.nan) -
np.nanmin(x.filled(np.nan)))
return np.sqrt(
x.filled(np.nan) -
np.nanmin(x.filled(np.nan)))
return np.sqrt(x - np.nanmin(x))


def log(x):
if isinstance(x, np.ma.masked_array):
return np.log(x.filled(np.nan) -
np.nanmin(x.filled(np.nan)) + 1)
return np.log(
x.filled(np.nan) -
np.nanmin(x.filled(np.nan)) + 1)
return np.log(x - np.nanmin(x) + 1)


def log_log_sqrt(x):
if isinstance(x, np.ma.masked_array):
return np.log(np.log(np.sqrt(x.filled(np.nan) -
np.nanmin(x.filled(np.nan))) + 1) + 1)
return np.log(np.log(
np.sqrt(x.filled(np.nan) -
np.nanmin(x.filled(np.nan))) + 1) + 1)
return np.log(np.log(np.sqrt(x - np.nanmin(x)) + 1) + 1)


Expand Down

0 comments on commit 3b6ff9d

Please sign in to comment.