From 01f905a237a2423f5637ee6a0f43e0937c55d2ea Mon Sep 17 00:00:00 2001 From: Deepak Mallubhotla Date: Thu, 26 May 2022 12:49:45 -0500 Subject: [PATCH] fix: probability of occupancy fixed --- pdme/model/log_spaced_random_choice_model.py | 2 +- pdme/model/random_count_multidipole_fixed_magnitude_model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdme/model/log_spaced_random_choice_model.py b/pdme/model/log_spaced_random_choice_model.py index 2d885db..f933e0f 100644 --- a/pdme/model/log_spaced_random_choice_model.py +++ b/pdme/model/log_spaced_random_choice_model.py @@ -111,7 +111,7 @@ class LogSpacedRandomCountMultipleDipoleFixedMagnitudeModel(DipoleModel): theta = 2 * numpy.pi * rng.random(shape) phi = numpy.arccos(2 * rng.random(shape) - 1) - p_mask = rng.binomial(1, 0.5, shape) + p_mask = rng.binomial(1, self.prob_occupancy, shape) p_magnitude = self.pfixed * p_mask px = p_magnitude * numpy.cos(theta) * numpy.sin(phi) diff --git a/pdme/model/random_count_multidipole_fixed_magnitude_model.py b/pdme/model/random_count_multidipole_fixed_magnitude_model.py index 0c11d8f..718ceab 100644 --- a/pdme/model/random_count_multidipole_fixed_magnitude_model.py +++ b/pdme/model/random_count_multidipole_fixed_magnitude_model.py @@ -103,7 +103,7 @@ class RandomCountMultipleDipoleFixedMagnitudeModel(DipoleModel): theta = 2 * numpy.pi * rng.random(shape) phi = numpy.arccos(2 * rng.random(shape) - 1) - p_mask = rng.binomial(1, 0.5, shape) + p_mask = rng.binomial(1, self.prob_occupancy, shape) p_magnitude = self.pfixed * p_mask px = p_magnitude * numpy.cos(theta) * numpy.sin(phi)