-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathExampleUsage.py
More file actions
54 lines (43 loc) · 2.79 KB
/
ExampleUsage.py
File metadata and controls
54 lines (43 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from LMIO.wrapper import *
import matplotlib.pyplot as plt
from easygui import fileopenbox
swcFile = fileopenbox(msg='SWC file with three point soma', filetypes=['*.swc'])
swcFiles = [swcFile]
##*********************************************************************************************************************
## Usage Example getMeasureDistribution
##*********************************************************************************************************************
LMOutput = getMeasureDistribution(['Pk_classic'], swcFiles, nBins=50)
plt.figure()
print LMOutput[0]['measure1BinCentres']
print LMOutput[0]['measure1BinCounts']
plt.bar(LMOutput[0]['measure1BinCentres'][0], LMOutput[0]['measure1BinCounts'][0])
plt.draw()
plt.show(block=False)
##*********************************************************************************************************************
##*********************************************************************************************************************
## # Usage Example getMeasure
##*********************************************************************************************************************
# LMOutput = getMeasure(['Surface'], swcFiles)
# print 'Neuron Surface Area is ' + str(LMOutput[0]['WholeCellMeasures'][0][4])
##*********************************************************************************************************************
#*********************************************************************************************************************
# Usage Example getMeasureDependence without averaging
#*********************************************************************************************************************
# LMOutput = getMeasureDependence(['N_branch'], ['EucDistance'], swcFiles, nBins=100, average=False)
# plt.figure()
# plt.plot(LMOutput[0]['measure1BinCentres'][0], LMOutput[0]['measure2BinSums'][0], 'ro', mfc='r', ms=5)
# plt.draw()
# plt.show(block=False)
#*********************************************************************************************************************
#*********************************************************************************************************************
# Usage Example getMeasureDependence with averaging
#*********************************************************************************************************************
# LMOutput = getMeasureDependence(['Diameter'], ['EucDistance'], swcFiles, nBins=100, average=True)
# plt.figure()
# plt.errorbar(LMOutput[0]['measure1BinCentres'][0],
# LMOutput[0]['measure2BinAverages'][0],
# LMOutput[0]['measure2BinStdDevs'][0],
# color='r', ls='-', marker='o', ms=5, mfc='r')
# plt.draw()
# plt.show(block=False)
#*********************************************************************************************************************