aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Helpers/formation_helpers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Helpers/formation_helpers.py b/Helpers/formation_helpers.py
index 86109ff..02db764 100644
--- a/Helpers/formation_helpers.py
+++ b/Helpers/formation_helpers.py
@@ -79,7 +79,7 @@ def assign_wmf_ronco2014(a):
def compute_kde(df, evaluation_range, evaluation_range_step, variable, \
- cov_tight_factor=4.0, integrates_to=-1):
+ cov_tight_factor=4.0, integrates_to=-1, noweights=False):
"""
Compute Kernel Density Estimate for Formation Runs.
@@ -126,6 +126,10 @@ def compute_kde(df, evaluation_range, evaluation_range_step, variable, \
weights = np.asarray(df.mass/df.mass.max())
else:
weights = np.ones_like(df.mass)
+
+ # Override Weights?
+ if noweights:
+ weights = np.ones_like(df.mass)
# Compute KDE
cv = sh.Covariator(np.atleast_2d(input_array), weights)