bmtool 0.3.7__tar.gz → 0.3.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bmtool-0.3.7 → bmtool-0.3.9}/PKG-INFO +29 -1
- {bmtool-0.3.7 → bmtool-0.3.9}/README.md +28 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/bmplot.py +15 -3
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/plot_commands.py +4 -2
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/PKG-INFO +29 -1
- {bmtool-0.3.7 → bmtool-0.3.9}/setup.py +1 -1
- {bmtool-0.3.7 → bmtool-0.3.9}/LICENSE +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/__init__.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/__main__.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/debug/__init__.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/debug/commands.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/debug/debug.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/manage.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/singlecell.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/util/__init__.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/util/commands.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/util/neuron/__init__.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/util/neuron/celltuner.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool/util/util.py +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/SOURCES.txt +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/dependency_links.txt +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/entry_points.txt +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/requires.txt +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/bmtool.egg-info/top_level.txt +0 -0
- {bmtool-0.3.7 → bmtool-0.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: bmtool
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.9
|
4
4
|
Summary: BMTool
|
5
5
|
Home-page: https://github.com/tjbanks/bmtool
|
6
6
|
Download-URL:
|
@@ -342,6 +342,34 @@ This will plot cells in the `hippocampus` network, using the `pop_name` as the c
|
|
342
342
|
|
343
343
|
All `point_process` cell types will be ignored since they do not have physical locations.
|
344
344
|
|
345
|
+
### Plot 3d cell location and rotation
|
346
|
+
Plot the location and rotation of your cells. Plot all of your cells with a single command
|
347
|
+
```
|
348
|
+
bmtool plot cell rotation
|
349
|
+
```
|
350
|
+

|
351
|
+
|
352
|
+
Customize your plot by limiting the cells you want or selecting a max number of cells to plot.
|
353
|
+
```
|
354
|
+
bmtool plot --config simulation_configECP.json cell rotation --group-by pop_name --group CR --max-cells 100 --quiver-length 100 --arrow-length-ratio 0.25
|
355
|
+
```
|
356
|
+

|
357
|
+
|
358
|
+
Code
|
359
|
+
```
|
360
|
+
from bmtool import
|
361
|
+
from bmtool import bmplot
|
362
|
+
|
363
|
+
bmplot.cell_rotation_3d(config=config,
|
364
|
+
populations=populations,
|
365
|
+
group_by=group_by,
|
366
|
+
group=group,
|
367
|
+
title=title,
|
368
|
+
max_cells=max_cells,
|
369
|
+
quiver_length=quiver_length,
|
370
|
+
arrow_length_ratio=arrow_length_ratio)
|
371
|
+
```
|
372
|
+
|
345
373
|
### Plotting Current Clamp and Spike Train Info
|
346
374
|
To plot all current clamp info involved in a simulation, use the following command (uses 'simulation_config.json' as default)
|
347
375
|
```
|
@@ -321,6 +321,34 @@ This will plot cells in the `hippocampus` network, using the `pop_name` as the c
|
|
321
321
|
|
322
322
|
All `point_process` cell types will be ignored since they do not have physical locations.
|
323
323
|
|
324
|
+
### Plot 3d cell location and rotation
|
325
|
+
Plot the location and rotation of your cells. Plot all of your cells with a single command
|
326
|
+
```
|
327
|
+
bmtool plot cell rotation
|
328
|
+
```
|
329
|
+

|
330
|
+
|
331
|
+
Customize your plot by limiting the cells you want or selecting a max number of cells to plot.
|
332
|
+
```
|
333
|
+
bmtool plot --config simulation_configECP.json cell rotation --group-by pop_name --group CR --max-cells 100 --quiver-length 100 --arrow-length-ratio 0.25
|
334
|
+
```
|
335
|
+

|
336
|
+
|
337
|
+
Code
|
338
|
+
```
|
339
|
+
from bmtool import
|
340
|
+
from bmtool import bmplot
|
341
|
+
|
342
|
+
bmplot.cell_rotation_3d(config=config,
|
343
|
+
populations=populations,
|
344
|
+
group_by=group_by,
|
345
|
+
group=group,
|
346
|
+
title=title,
|
347
|
+
max_cells=max_cells,
|
348
|
+
quiver_length=quiver_length,
|
349
|
+
arrow_length_ratio=arrow_length_ratio)
|
350
|
+
```
|
351
|
+
|
324
352
|
### Plotting Current Clamp and Spike Train Info
|
325
353
|
To plot all current clamp info involved in a simulation, use the following command (uses 'simulation_config.json' as default)
|
326
354
|
```
|
@@ -409,12 +409,13 @@ def cell_rotation_3d(**kwargs):
|
|
409
409
|
populations_list = kwargs["populations"]
|
410
410
|
config = kwargs["config"]
|
411
411
|
group_keys = kwargs["group_by"]
|
412
|
-
title = kwargs
|
412
|
+
title = kwargs.get("title")
|
413
413
|
save_file = kwargs["save_file"]
|
414
414
|
quiver_length = kwargs["quiver_length"]
|
415
415
|
arrow_length_ratio = kwargs["arrow_length_ratio"]
|
416
416
|
group = kwargs["group"]
|
417
|
-
max_cells = kwargs
|
417
|
+
max_cells = kwargs.get("max_cells",999999999)
|
418
|
+
init_vector = kwargs.get("init_vector","1,0,0")
|
418
419
|
|
419
420
|
nodes = util.load_nodes_from_config(config)
|
420
421
|
|
@@ -480,8 +481,19 @@ def cell_rotation_3d(**kwargs):
|
|
480
481
|
#Convert to arrow direction
|
481
482
|
from scipy.spatial.transform import Rotation as R
|
482
483
|
uvw = pd.DataFrame([U,V,W]).T
|
483
|
-
|
484
|
+
init_vector = init_vector.split(',')
|
485
|
+
init_vector = np.repeat([init_vector],len(X),axis=0)
|
486
|
+
|
487
|
+
# To get the final cell orientation after rotation,
|
488
|
+
# you need to use function Rotaion.apply(init_vec),
|
489
|
+
# where init_vec is a vector of the initial orientation of a cell
|
490
|
+
#rots = R.from_euler('xyz', uvw).apply(init_vector.astype(float))
|
491
|
+
#rots = R.from_euler('xyz', pd.DataFrame([rots[:,0],rots[:,1],rots[:,2]]).T).as_rotvec().T
|
492
|
+
|
493
|
+
rots = R.from_euler('zyx', uvw).apply(init_vector.astype(float)).T
|
484
494
|
h = ax.quiver(X, Y, Z, rots[0],rots[1],rots[2],color=color,label=group_name, arrow_length_ratio = arrow_length_ratio, length=quiver_length)
|
495
|
+
|
496
|
+
#h = ax.quiver(X, Y, Z, rots[0],rots[1],rots[2],color=color,label=group_name, arrow_length_ratio = arrow_length_ratio, length=quiver_length)
|
485
497
|
ax.scatter(X,Y,Z,color=color,label=group_name)
|
486
498
|
handles.append(h)
|
487
499
|
if not handles:
|
@@ -136,15 +136,17 @@ def cell(ctx,title,save_file):
|
|
136
136
|
@click.option('--max-cells', type=click.INT, default=999999999, help="max number of cells to display [default: 999999999]")
|
137
137
|
@click.option('--quiver-length', type=click.FLOAT, default=10, help="how long the arrows should be [default: 10]")
|
138
138
|
@click.option('--arrow-length-ratio', type=click.FLOAT, default=0.2, help="ratio for the arrow of the quiver [default: 0.2]")
|
139
|
+
@click.option('--init-vector', type=click.STRING, default="1,0,0", help="comma delimited initial rotation vector specified by pt3dadd [default: 0,0,1]")
|
139
140
|
@click.pass_context
|
140
|
-
def rotation_3d(ctx,populations,group_by,group,max_cells,quiver_length,arrow_length_ratio):
|
141
|
+
def rotation_3d(ctx,populations,group_by,group,max_cells,quiver_length,arrow_length_ratio,init_vector):
|
141
142
|
cell_rotation_3d(config=ctx.obj['config'],**ctx.obj['cell'],
|
142
143
|
populations=populations,
|
143
144
|
group_by=group_by,
|
144
145
|
group=group,
|
145
146
|
max_cells=max_cells,
|
146
147
|
quiver_length=quiver_length,
|
147
|
-
arrow_length_ratio=arrow_length_ratio
|
148
|
+
arrow_length_ratio=arrow_length_ratio,
|
149
|
+
init_vector=init_vector)
|
148
150
|
if ctx.obj['display']:
|
149
151
|
plt.show()
|
150
152
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: bmtool
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.9
|
4
4
|
Summary: BMTool
|
5
5
|
Home-page: https://github.com/tjbanks/bmtool
|
6
6
|
Download-URL:
|
@@ -342,6 +342,34 @@ This will plot cells in the `hippocampus` network, using the `pop_name` as the c
|
|
342
342
|
|
343
343
|
All `point_process` cell types will be ignored since they do not have physical locations.
|
344
344
|
|
345
|
+
### Plot 3d cell location and rotation
|
346
|
+
Plot the location and rotation of your cells. Plot all of your cells with a single command
|
347
|
+
```
|
348
|
+
bmtool plot cell rotation
|
349
|
+
```
|
350
|
+

|
351
|
+
|
352
|
+
Customize your plot by limiting the cells you want or selecting a max number of cells to plot.
|
353
|
+
```
|
354
|
+
bmtool plot --config simulation_configECP.json cell rotation --group-by pop_name --group CR --max-cells 100 --quiver-length 100 --arrow-length-ratio 0.25
|
355
|
+
```
|
356
|
+

|
357
|
+
|
358
|
+
Code
|
359
|
+
```
|
360
|
+
from bmtool import
|
361
|
+
from bmtool import bmplot
|
362
|
+
|
363
|
+
bmplot.cell_rotation_3d(config=config,
|
364
|
+
populations=populations,
|
365
|
+
group_by=group_by,
|
366
|
+
group=group,
|
367
|
+
title=title,
|
368
|
+
max_cells=max_cells,
|
369
|
+
quiver_length=quiver_length,
|
370
|
+
arrow_length_ratio=arrow_length_ratio)
|
371
|
+
```
|
372
|
+
|
345
373
|
### Plotting Current Clamp and Spike Train Info
|
346
374
|
To plot all current clamp info involved in a simulation, use the following command (uses 'simulation_config.json' as default)
|
347
375
|
```
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|