Commit e12e0b0
sKCSD (#14)
* sKCSD support for swc morphologies
* Params improvement
* Small test
* Ploting function for skCSD results, 2D morphology plot improved
* Comment added
* Loader, saver for simulation
* Fix slashes in paths
* Make Python2 and Python3 compatible
* Empty __init__ file
* Add untracked directories
* Tutorial data
* Comments on morphology and electrode positions data format
* Ignore *~ and #*
* Object loading and storing data for sKCSD3D
* Find paths of the morphology, LFP and electrode positions files
* Data for tests
* Test loading morphology
* Load electrode positions
* Load data
* Ball and stick model with 8 electrodes
* Ball and stick model with 16 electrodes
* Ball and stick model with 128 electrodes
* Correct morphology
* Use data loder
* Correct morphology
* Store preprocessed data in data directory
* Correct axes labels in morphology plots
* Fix paths in sKCD3D example
* Add extent
* Calculate kernels for ball and stick
* Fix plotting neurons
* Change pickle to json
* Script for running simulations and different morphologies
* Ignore backup files while loading files for sKCSD
* Fix paths
* Choose which electrode to plot
* Script for generating fig 2
* Load only swc files
* Remove unnecessary prints
* Loop over electrode number
* Save membrane current
* Add tstop
* Fix elctrode distance bug
* Bug fix -- last segment does have a parent
* Loop back using parent information
* Fix setting correct electrode positions
* Make figure
* Wider range for morphology
* Use parent section information to build swc tree
* Fix scaling in sKCSD3D example
* Test if all the sources are distributed within the cell
* Save ids of dendrites connected while enclosing morphology
* Change width of gauss and source number in example
* Fix comparing paths in loadData test
* Add checking if all branches are covered with loops
* Test data
* Ignore pngs
* Test kCSD calculation for ball and stick
* Save loops as an array
* Try out more points in fig 2
* Fix imports and paths
* More interpolation points for potential estimation for skCSD
* Implement KCSD calculation using points on the 1D morphology for estimation.
cell_pos, which stores dendrite locations on the morphology loop, was added to sKCSDcell.
B tilda uses distance between sources and dendrites on the morphology loop now.
B uses distance between source positions (x,y,z) and electrode positions now.
Add transformation of CSD which is calculated on the morphology loop to cartesian coordinates.
Basis was switch to 1D.
The grid parameters are no longer necessary.
* Sinusoid synaptic stimulation for fig 1
* Remove unnecessary parameters
* Dendritic segment cannot be smaller than 2 um for CSD and potential transformation
* Remove unnecessary grid parameters from example of sKCSD reconstruction
* First version of the code
* Change output filenames
* Cosine synaptic stimulation with frequency dependent on segment location
* CSD calculation as default
* Code refactoring
* Save potential and current on 1D morphology and 3D grid
* Move csd transformation from sKCSD3D to sKCSDcell
* Hoc file to generate y-shaped neuron
* Fix bug in finding parent
* Code refactorization for csd and potential calculation in 3D
* Symmetric stimulation of a Y-shaped neuron
* First version of Fig 3
* Random grid
* Fig 4 of eLife article
* Change script names to match figure numbers in the published article
* Change get to pop to notify user if he used nonexistent key arguments
* Make one figure
* Create separate directory for figures
* Fix typo
* Move most common sequences of operations to module functions
* Fig 7
* Domi electrodes
* Correct Domi path
* Correct L1 error calculation
* Make compatible with new LFPy
* Small branched morphology for tests
* Account for branches longer than shorterst branch
* Add small non-trivial neuron morphology to test transformation to 3D
* Add extent argument to plotting with imshow
* Remove looping over R and lambda. Clean up the code
* Remove unused code
* Return cell object after simulations not just the directory
* Hex grid and injection of oscillatory current with random synaptic stimulation
* Set dt
* Correct potential calculation
Intergrate over s from -2R to morphology loop length +2R of source divided by position (Eq 17).
* .5 ms simulation dt
* Add hexagonal grid parameter to keyword arguments of simulation functions
* A more reasonable default R
* Print path when saving csd
* Fix order in oscillatory stimulation
* Default grain of the 3D grid 2e-6
* Add more buttons
* Use classmethod setupClass instead of setUp function
* Clean up code to reflect changes in sKCSD3D
* Assure absolute imports (Python3 compatibility)
* Python 3 compatibility -- absolute imports
* Add changing dt
* Take into account point 0 of the morphology
* Add option of returning CSD/potential in the loop space
* Add test checking 1D loop to 3D cartesian interpolation
* Specify the initial point at the beginning of the morphology file
* Loop over possible R and lambda values
Transform Dori's lambda values to kCSD lambda values: in kCSD Gaussian functions are normalized (divided) by (2*pi)^0.5*R, kernels are normalized by number of sources and potentials are divided by 4*pi*sigma.
* Add interpolation tests for the larger cell
* Add interpolation tests for the larger cell
* Simplify placing sources
Fist loop around morphology (same algorythm as before, without placing sources). Place sources on the morphology. Find source cartesian coordinates using interpolation and loop coordinates, both on the morphology loop and in 3D.
* Fix import and typo
* Fix saving 3D morphology
* Remove unused variables
* Add max_dist tests
* Further tests for total length of the morphology loop
Check if max_dist calculated during looping over morphology is equall to total distance calculated using the morphology file.
* Add docstrings. Remove unused function
* Add class description
* Add autorship
* Change sKCSD3D class name to sKCSD
* Rename sKCSD3D to sKCSD
* Remove weights
* Works with skmonaco
* Add tests for sKCSDcell.points_in_between()
* Change cell to one used in tutorials
* Divide get_grid to 2 functions
* Y-shaped neuron
* Test finding 3D loop coordinates
* Test continuity
* Remove unnecessary prints
* Add dist_table_density to docstring
* On transformation parameter for sKCSD
'3D' -- transforms quantity (CSD or potential) to 3D
'segments' -- transforms quantity to neuron's segments
None -- no transformation, quantity is in the morphology loop space
* Test, if CSD/potential is the right shape
* Move loop to segment transformation to sKCSDcell object
* Save CSD and potential in loop space
* Fix too many arguments in saving simulations
* Basic version of plotting results in 3D, loop and segment space
* Extent matching 3D properties of the cell
* Move ploting maps to plotting_functions
* Ball and stick data for tests
* import run_LFP after compiling sinsyn.mod
* Move compiling sinsyn.mod before importing LFPy
* Move specifying saving directory to utility functions
* Remove unused buttons
* Linear interpolation on xyz position on the morphology loop
* 1 or 3 column files with electrode positions
* Move loadData to tutorials
* Lower cosine injection
* Add running sKCSD for arbitrary data
Specify path to morphology, electrode positions and LFP. Move loadData to tutorials.
* loadData in tutorials
* Fix lambda range1 parent 30da013 commit e12e0b0
58 files changed
Lines changed: 14001 additions & 15 deletions
File tree
- corelib
- tests
- Data
- Simple_with_branches
- LFP
- electrode_positions
- morphology
- Y_shaped_neuron
- LFP
- electrode_positions
- morphology
- ball_and_stick_8
- LFP
- electrode_positions
- morphology
- gang_7x7_200
- LFP
- electrode_positions
- morphology
- tutorials
- Data
- ball_and_stick_128
- LFP
- electrode_positions
- morphology
- ball_and_stick_16
- LFP
- electrode_positions
- morphology
- ball_and_stick_8
- LFP
- electrode_positions
- morphology
- gang_7x7_200
- LFP
- electrode_positions
- morphology
- morphology
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
142 | | - | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
151 | | - | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | | - | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| |||
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | | - | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
| |||
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
407 | 412 | | |
408 | 413 | | |
409 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
410 | 418 | | |
411 | 419 | | |
412 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
| 160 | + | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| |||
| 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 | + | |
0 commit comments