diff --git a/src/postprocessor/core/processor.py b/src/postprocessor/core/processor.py index 6efbddaf5b034d704a86a27b867d28dd697ed5d3..2819cc2b2b405d46f95ed9767c656671a6910d31 100644 --- a/src/postprocessor/core/processor.py +++ b/src/postprocessor/core/processor.py @@ -201,13 +201,15 @@ class PostProcessor(ProcessABC): self._signal[self.targets["prepost"]["picker"][0]] ) - mothers, daughters = np.array(self.picker.mothers), np.array( - self.picker.daughters - ) + # picker.mothers and picker.daughters already assigned based on + # picker.cells.mothers_daughters, but there is no picker.traps variable + traps = self.cells.mothers_daughters[:, 0].tolist() + mothers = np.array(self.picker.mothers) + daughters = np.array(self.picker.daughters) multii = pd.MultiIndex.from_arrays( ( - np.append(mothers, daughters[:, 1].reshape(-1, 1), axis=1).T + np.column_stack((traps, mothers, daughters)) if daughters.any() else [[], [], []] ), @@ -257,7 +259,7 @@ class PostProcessor(ProcessABC): self.lineage_merged = pd.MultiIndex.from_arrays( np.unique( - np.append(mothers, daughters[:, 1].reshape(-1, 1), axis=1), + np.column_stack((traps, mothers, daughters)), axis=0, ).T, names=["trap", "mother_label", "daughter_label"],