diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-28 18:57:00 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-28 18:57:00 +0200 |
commit | fd66690aa9c2dc429325891c906b97d5184bc5e0 (patch) | |
tree | c5b2b6ab9f4e85a062ff6730061c6060b148d99c /stats.py | |
parent | e4b732abd4ea034f75645d333ff5b357d1b612e7 (diff) |
analyzing functions
Diffstat (limited to 'stats.py')
-rw-r--r-- | stats.py | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -297,7 +297,20 @@ class Stats: def analyze_deviations(self, celltype): ds = self.data.eject_deviations[celltype] - if len(ds) == 0: return - mean, stddev = fit_gaussian(ds) - print(celltype+" eject/split direction deviations: mean = "+str(mean)+", stddev="+str(stddev)) + try: + mean, stddev = fit_gaussian(ds) + except: + mean, stddev = "???", "???" + + print(celltype+" eject/split direction deviations: mean = "+str(mean)+", stddev="+str(stddev)+", ndata="+str(len(ds))) + + def analyze_distances(self, celltype): + ds = [v[0] for v in self.data.eject_distlogs[celltype]] + + try: + mean, stddev = fit_gaussian(ds) + except: + mean, stddev = "???", "???" + + print(celltype+" eject/split distances: mean = "+str(mean)+", stddev="+str(stddev)+", ndata="+str(len(ds))) |