From 1f013830196ad0a615c2fb243da4d8cbd6a608f9 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Fri, 23 Nov 2018 12:29:36 +0000
Subject: [PATCH] BF: Cluster table will not contain P values if cluster
 thresholding was not used.

---
 fsl/data/featanalysis.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fsl/data/featanalysis.py b/fsl/data/featanalysis.py
index 246722b57..7c38eb777 100644
--- a/fsl/data/featanalysis.py
+++ b/fsl/data/featanalysis.py
@@ -385,6 +385,12 @@ def loadClusterResults(featdir, settings, contrast):
 
                 setattr(self, attrName, val)
 
+            # if cluster thresholding was not used,
+            # the cluster table will not contain
+            # P valuse.
+            if not hasattr(self, 'p'):    self.p    = 1.0
+            if not hasattr(self, 'logp'): self.logp = 0.0
+
     # This dict provides a mapping between
     # Cluster object attribute names, and
     # the corresponding column name in the
-- 
GitLab