Commit 654ee7a
Add sKCSD tutorial (#88)
* Introduction to sKCSD tutorial
* Add description for load data
* Add example how to add morphology to empty data
* Better description of assign function
* Update test files.
Update files for tests (and test_loadData.py to account for change
filenames). Add segment lengths and membrane currents for
sKCSD tutorial. Fix a bug in checking branching points in test_sKCSDcell.py.
* Delete unused test data files.
* Fix typo in the name of the file with electrode positions
* Fix error in skcsd calculation
skcsd is current density, no need to divide by segment length.
* Add test data generation
* Shorter simulation for test data
* Make data plot of ground truth current density
* Even shorter data (using a smaller morphology) for the skcsd tutorial
* First description of values()
* Add a comparison fig to the tutorial
* Clean up dataset
Increase number of used electrodes from 16 to 100. Record soma voltage,
so it can be shown in tutorials.
* Remove unused morphology file
* New morphology file
This actually is the same morphology file as before, only with a
filename corresponding to the simulation parameters, which have been
changed, because now 10x10 electrode grid is used.
* Save array with timestamps to file
* Add soma voltage plot
* Fix small errors
* Add some morphology transformations
* Comment out L-curve for speed
* Add savefig
Switch to plotting with imshow, remove plt.show(), add a few tweaks.
* Do not draw circles for morphology
* Provide extent in meters not in microns.
For compatibility with the rest of KCSD, which is implemented in SI
units.
* Remove obsolete figure
* Remove unnecessary print
* Move sKCSDcell.distribute_srcs_3D_morph() to init
* Rewrite calculation of 2D morphology for images
Rewrite calculation of 2D morphology for drawing images to use only
code used for finding indices for CSD and potential transformations
from loops to 3D morphology, to assure that morphology and CSD (or
potential) will match perfectly. Provide extent in ordinary form
and not switched x and y (for easier use with imshow).
* Switch to 4 x 5 electrode setup
* Explore more lambdas
* Remove unused file
* Update test morphology filename
* Cleared kernel
* More values of lambda to choose from
* Remove l-curve from the figure
* Divide code into functions
* Plot morphology with interpolation to get rid of visible pixels
* Initial setup of the figure
* Move drawing plots into separate functions
* Draw electrode positions
* Draw CSD and ground truth in 2D projection
* Make pixels for 3D visualizations of all equal dimensions
* Use loop coordinates for index calculation
* Draw with gray, where neuron is active
* Add transparency to plotting circles (squares)
* Use segment coordinates for plotting morphology
* If not enough sources use segment coordinates for 3D visualization
* Daniel's suggestions
Change number of panels. Add panel labels.
* Remove obsolete file
* Revert "If not enough sources use segment coordinates for 3D visualization"
This reverts commit 3464307.
This commit introduced a bug.
* Remove execution of distribute_srcs_morph()
This method is now executed when initializing the sKCSDcell object.
* Remove tests with y_points
I no longer remember, what they were supposed to test.
* Fix tests after fixing loop coordinates in sKCSDcell
1) For ball and stick neuron give 104 sources, so there are two loops
for each segment.
2) Fix test for segment coordinates for Y-stick neuron -- last segment
has 4 points.
3) Take correct point (first) for testing loop continuity for Y-stick
neuron.
* For points in between the same point return this point
* Choose if drawn morphology should be based on segments or loops
* Remove obsolete file
* Add utf-8 clause for Python2 compatibility
* Quatation marks instead of apostrophes for clarity
* Use loop right ends as estimation points for sKCSD
There was an inconsitency in choosing points for sKCSD estimation. The
point of origin was also taken, which made the x dimension k_interp_pot
different from the number of loops. This has been fixed by adding a new
class variable, loop_pos, which is used only for sKCSD estimation.
Variables est_poz and est_xyz are used for finding Cartesian coordinates
of points on the morphology loop.
* Make TimeStim the same length as the simulation itself
* Fix drawing cell with custom resolution
Add custom dx for calculating pixel coordinates for drawing segments.
First find correct dxs for custom resolution then calculate pixel
coordinates.
Remove np.ceil, which made all the custom dxs equal one.
* Deal with transformation of snapshots
A snapshot of potential or CSD (potential or CSD
at a chosen time t) is one dimensional
and sKCSDcell.transform_to_3D yields an IndexError.
Transform 1D array to a 3D array if necessary.
* Ignore directories generated by scripts and neuron
* Transform snapshots of CSD and ground_truth
* Best parameters for the complex morphology
* Ignore files in LCurve results directory
* Narrower basis function to better match sKCSD to ground truth
* Update estm_dists tests
estm_dists are of the len(sKCSDcell.source_pos) x len(sKCSD.est_pos) - 1
size. sKCSD.est_pos contains all the loop positions starting with the
origin, which results in two points for the first loop and one point for
all the others. Consequently the origin is not included in estm_dists.
* Update tests, the origin no longer in estm_dist
* Fix preposition
* Remove unnecessary print
* Microns in coded in utf-8
* Move sKCSD utility functions to sKCSD_utils
* Fix small bugs
* Fix errors introduced by changing LoadData location
* Uncomment reconstruction
* Remove unused imports1 parent 2cfdf56 commit 654ee7a
30 files changed
Lines changed: 1517 additions & 1863 deletions
File tree
- data
- gang_7x7_200
- LFP
- electrode_positions
- morphology
- morphology
- figures
- kCSD_properties
- sKCSD_paper
- kcsd
- tests
- validation
- tutorials
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
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 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 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 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Large diffs are not rendered by default.
0 commit comments