aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2015-11-21 10:56:39 +0100
committerVolker Hoffmann <volker@cheleb.net>2015-11-21 10:59:03 +0100
commit5d82f36fdec4938e32e1f6149d9cf36c463c9415 (patch)
tree1d8b54997cb40446c5b617d11fbf2c8cfb0ce158
parente95c8150531f2a001bcb68f6f167b51b9c213e6e (diff)
feat: support KDE computing for water mass fractions
-rw-r--r--Helpers/formation_helpers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Helpers/formation_helpers.py b/Helpers/formation_helpers.py
index cfeb63a..df1a629 100644
--- a/Helpers/formation_helpers.py
+++ b/Helpers/formation_helpers.py
@@ -84,7 +84,8 @@ def compute_kde(df, evaluation_range, evaluation_range_step, variable, \
1. Mass-Weighted Semi-Major Axis Distribution
2. Mass-Weighted Eccentricity Distribution
3. Mass-Weighted Inclination Distribution
- 4. Mass Function.
+ 4. Water Mass Fraction
+ 5. Mass Function.
Picking a cov_tight_factor is a bit of a dark art. Too small and the
KDE is way too smooth. Too large and the resulting KDE doesn't smooth over
@@ -106,6 +107,8 @@ def compute_kde(df, evaluation_range, evaluation_range_step, variable, \
input_array = np.asarray(df.e)
elif variable == 'i':
input_array = np.asarray(df.i)
+ elif variable == 'wmf':
+ input_array = np.log10(np.asarray(df.wmf_02))
elif variable == 'm':
input_array = np.log10(np.asarray(df.mass))
else: