aboutsummaryrefslogtreecommitdiffstats
path: root/Helpers
diff options
context:
space:
mode:
Diffstat (limited to 'Helpers')
-rw-r--r--Helpers/formation_helpers.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Helpers/formation_helpers.py b/Helpers/formation_helpers.py
index 5652c99..395aff0 100644
--- a/Helpers/formation_helpers.py
+++ b/Helpers/formation_helpers.py
@@ -172,8 +172,12 @@ def compute_wmf(dfo, dfo_t0, dfc, showstep=False):
dfo_loc = dfo_row[1]
# Identify Source Particles
- sources = return_sources(int(dfo_loc.pid), dfc_now)
- dfo_sources = dfo_t0[dfo_t0.pid.isin(sources)]
+ sources = \
+ return_sources(int(dfo_loc.pid), \
+ dfc_now[dfc_now.ifname == int(dfo_loc.ifname)])
+ dfo_sources = \
+ dfo_t0[(dfo_t0.pid.isin(sources)) & \
+ (dfo_t0.ifname == int(dfo_loc.ifname))]
# Compute WMF (Raymond+ 2004, Ronco+ 2014)
dfo_sources.loc[:,'wmf_01'] = \