bmtool 0.5.7.1__py3-none-any.whl → 0.5.7.2__py3-none-any.whl

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/bmplot.py CHANGED
@@ -197,7 +197,7 @@ def probability_connection_matrix(config=None,nodes=None,edges=None,title=None,s
197
197
 
198
198
  return
199
199
 
200
- def convergence_connection_matrix(config=None,title=None,sources=None, targets=None, sids=None, tids=None, no_prepend_pop=False,save_file=None,convergence=True,method='mean+std',include_gap=True):
200
+ def convergence_connection_matrix(config=None,title=None,sources=None, targets=None, sids=None, tids=None, no_prepend_pop=False,save_file=None,convergence=True,method='mean+std',include_gap=True,return_dict=None):
201
201
  """
202
202
  Generates connection plot displaying convergence data
203
203
  config: A BMTK simulation config
@@ -213,9 +213,9 @@ def convergence_connection_matrix(config=None,title=None,sources=None, targets=N
213
213
  raise Exception("config not defined")
214
214
  if not sources or not targets:
215
215
  raise Exception("Sources or targets not defined")
216
- return divergence_connection_matrix(config,title ,sources, targets, sids, tids, no_prepend_pop, save_file ,convergence, method,include_gap=include_gap)
216
+ return divergence_connection_matrix(config,title ,sources, targets, sids, tids, no_prepend_pop, save_file ,convergence, method,include_gap=include_gap,return_dict=return_dict)
217
217
 
218
- def divergence_connection_matrix(config=None,title=None,sources=None, targets=None, sids=None, tids=None, no_prepend_pop=False,save_file=None,convergence=False,method='mean+std',include_gap=True):
218
+ def divergence_connection_matrix(config=None,title=None,sources=None, targets=None, sids=None, tids=None, no_prepend_pop=False,save_file=None,convergence=False,method='mean+std',include_gap=True,return_dict=None):
219
219
  """
220
220
  Generates connection plot displaying divergence data
221
221
  config: A BMTK simulation config
@@ -264,8 +264,12 @@ def divergence_connection_matrix(config=None,title=None,sources=None, targets=No
264
264
  title = title + "Synaptic Convergence"
265
265
  else:
266
266
  title = title + "Synaptic Divergence"
267
- plot_connection_info(syn_info,data,source_labels,target_labels,title, save_file=save_file)
268
- return
267
+ if return_dict:
268
+ dict = plot_connection_info(syn_info,data,source_labels,target_labels,title, save_file=save_file,return_dict=return_dict)
269
+ return dict
270
+ else:
271
+ plot_connection_info(syn_info,data,source_labels,target_labels,title, save_file=save_file)
272
+ return
269
273
 
270
274
  def gap_junction_matrix(config=None,title=None,sources=None, targets=None, sids=None,tids=None, no_prepend_pop=False,save_file=None,type='convergence'):
271
275
  """
@@ -448,7 +452,7 @@ def edge_histogram_matrix(config=None,sources = None,targets=None,sids=None,tids
448
452
  fig.text(0.04, 0.5, 'Source', va='center', rotation='vertical')
449
453
  plt.draw()
450
454
 
451
- def plot_connection_info(text, num, source_labels,target_labels, title, syn_info='0', save_file=None):
455
+ def plot_connection_info(text, num, source_labels,target_labels, title, syn_info='0', save_file=None,return_dict=None):
452
456
  """
453
457
  write about function here
454
458
  """
@@ -472,10 +476,12 @@ def plot_connection_info(text, num, source_labels,target_labels, title, syn_info
472
476
  plt.setp(ax1.get_xticklabels(), rotation=45, ha="right",
473
477
  rotation_mode="anchor", size=12, weight = 'semibold')
474
478
 
479
+ graph_dict = {}
475
480
  # Loop over data dimensions and create text annotations.
476
481
  for i in range(num_source):
477
482
  for j in range(num_target):
478
483
  edge_info = text[i,j]
484
+ graph_dict[str(source_labels[i])+'2'+str(target_labels[j])] = edge_info
479
485
  if syn_info =='2' or syn_info =='3':
480
486
  if num_source > 8 and num_source <20:
481
487
  fig_text = ax1.text(j, i, edge_info,
@@ -499,7 +505,10 @@ def plot_connection_info(text, num, source_labels,target_labels, title, syn_info
499
505
  fig1.show()
500
506
  if save_file:
501
507
  plt.savefig(save_file)
502
- return
508
+ if return_dict:
509
+ return graph_dict
510
+ else:
511
+ return
503
512
 
504
513
  def connector_percent_matrix(csv_path: str = None, exclude_shell: bool = True,
505
514
  exclude_assembly: bool = False, title: str = 'Percent connection matrix') -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bmtool
3
- Version: 0.5.7.1
3
+ Version: 0.5.7.2
4
4
  Summary: BMTool
5
5
  Home-page: https://github.com/cyneuro/bmtool
6
6
  Download-URL:
@@ -30,6 +30,7 @@ Requires-Dist: questionary
30
30
  Requires-Dist: pynmodlt
31
31
  Requires-Dist: xarray
32
32
  Requires-Dist: fooof
33
+ Requires-Dist: requests
33
34
 
34
35
  # bmtool
35
36
  A collection of modules to make developing [Neuron](https://www.neuron.yale.edu/neuron/) and [BMTK](https://alleninstitute.github.io/bmtk/) models easier.
@@ -1,7 +1,7 @@
1
1
  bmtool/SLURM.py,sha256=AX5MKV7dD-XwS8SROnW1IyesZ3jDwMf0txO6mHxTbuw,13694
2
2
  bmtool/__init__.py,sha256=ZStTNkAJHJxG7Pwiy5UgCzC4KlhMS5pUNPtUJZVwL_Y,136
3
3
  bmtool/__main__.py,sha256=TmFkmDxjZ6250nYD4cgGhn-tbJeEm0u-EMz2ajAN9vE,650
4
- bmtool/bmplot.py,sha256=-kw4VOcTnA22JVQi1PzH2E308pcmY1Xo7oqgCnm0cC8,46260
4
+ bmtool/bmplot.py,sha256=C0zlEtUWtP7mSYXYqRjvLhKqMp8wRKe241aHUSnep30,46687
5
5
  bmtool/connectors.py,sha256=d5Pt66f9UHm8YY2qJ0mtYbASimczOzfviFxZQWkazjs,71804
6
6
  bmtool/graphs.py,sha256=K8BiughRUeXFVvAgo8UzrwpSClIVg7UfmIcvtEsEsk0,6020
7
7
  bmtool/manage.py,sha256=_lCU0qBQZ4jSxjzAJUd09JEetb--cud7KZgxQFbLGSY,657
@@ -16,9 +16,9 @@ bmtool/util/commands.py,sha256=zJF-fiLk0b8LyzHDfvewUyS7iumOxVnj33IkJDzux4M,64396
16
16
  bmtool/util/util.py,sha256=24E5rUoDU86nqypDF4uZJkuJKO1BrwrQE8lZzAxu1kw,56770
17
17
  bmtool/util/neuron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  bmtool/util/neuron/celltuner.py,sha256=xSRpRN6DhPFz4q5buq_W8UmsD7BbUrkzYBEbKVloYss,87194
19
- bmtool-0.5.7.1.dist-info/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
20
- bmtool-0.5.7.1.dist-info/METADATA,sha256=cgwZVmUCp3LN20uI_TD0FkTlxfvlNDei3HlW1-PVHi4,24107
21
- bmtool-0.5.7.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
22
- bmtool-0.5.7.1.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
23
- bmtool-0.5.7.1.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
24
- bmtool-0.5.7.1.dist-info/RECORD,,
19
+ bmtool-0.5.7.2.dist-info/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
20
+ bmtool-0.5.7.2.dist-info/METADATA,sha256=7zLPFl5uVwrzMwlXm_D6iJMrwQUk2oXNXIGqvyzgapM,24131
21
+ bmtool-0.5.7.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
22
+ bmtool-0.5.7.2.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
23
+ bmtool-0.5.7.2.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
24
+ bmtool-0.5.7.2.dist-info/RECORD,,