diff --git a/powdiffrac/simulation/noise.py b/powdiffrac/simulation/noise.py index 01819de..3194c99 100644 --- a/powdiffrac/simulation/noise.py +++ b/powdiffrac/simulation/noise.py @@ -125,7 +125,7 @@ def generate_noise( # scale noise according to max intensity if type(noise_lvl) is str or noise_lvl is None: # assume some form of random noise_lvl = rng.uniform(noise_min, noise_max, scans.shape[0]) - elif type(noise_lvl) is int: + elif type(noise_lvl) is float: noise_lvl = np.repeat(np.array([noise_lvl]), scans.shape[0], axis=0) gaus = gaus * (noise_lvl * np.max(scans, axis=1))[:, None] noisy_scan = np.add(scans, gaus) diff --git a/setup.py b/setup.py index 6d9b737..b1f6d03 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # Install dependencies setup( name="powder-diffraction", - version="1.0.3", + version="1.0.4", author="Jan Schuetzke, Nathan J. Szymanski", author_email="jan.schuetzke@kit.edu; nathan_szymanski@berkeley.edu", description="A package for the generation of synthetic powder diffraction scans from pymatgen Structures",