diff --git a/README.md b/README.md index efe04f6..16e0b59 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ for Efficient Numerical Computation, Computing in Science \& Engineering. Volume [2 SciPy python library. Travis E. Oliphant, SciPy: Open source scientific tools for Python, Computing in Science and Engineering, Volume 9, (10-20) 2007 +Installation +------------ +$ conda install -c neutronimaging neunorm Meta ---- diff --git a/src/NeuNorm/_version.py b/src/NeuNorm/_version.py deleted file mode 100644 index 8cf4a70..0000000 --- a/src/NeuNorm/_version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "1.6.8.dev1" diff --git a/src/NeuNorm/normalization.py b/src/NeuNorm/normalization.py index d4a5da4..21c4357 100644 --- a/src/NeuNorm/normalization.py +++ b/src/NeuNorm/normalization.py @@ -312,9 +312,13 @@ def _auto_gamma_filtering(self, data=None): # we may be dealing with a float time, that means it does not need any gamma filtering try: - max = np.iinfo(data.dtype).max - except Exception as e: - logging.warning(f"Use default max value for data type: {e}") + data_type = data.dtype + if data_type in [float, "float32"]: + max = np.finfo(data_type).max + else: + max = np.iinfo(data.dtype).max + except Exception as error: + logging.warning(f"Use default max value for data type: {error}") return data manual_gamma_threshold = max - 5