projectpyrho / pyrho Goto Github PK
View Code? Open in Web Editor NEWA virtual optogenetics laboratory
License: BSD 3-Clause "New" or "Revised" License
A virtual optogenetics laboratory
License: BSD 3-Clause "New" or "Revised" License
This affects all photocurrent plots with centred axes except rectifier
.
Either the ylims are not set properly (when max(pc.I) == 0) or the left (y-axis) spines and ticks are not drawn up to ymax.
Hello:-)
Thank you for a nice software package!
I tried to modify the code from the example notebook for my purposes but I get the following error:
BrianObjectException: Error encountered with object named "statemonitor_3".
Object was created here (most recent call only, full details in debug log):
File "", line 35, in
monitors={'states' : StateMonitor(neuron_rho, RhO.brianStateVars, record=0), 'I': StateMonitor(neuron_rho, 'I', record=0), # Record current
Here's my code
from brian2 import *
start=time.time()
defaultclock.dt = 0.1*ms
tau = 10*ms
vr = -70*mV
vt = -60*mV
eqs = '''
dv/dt = I_ampa/Cm : volt
I_ampa=-g_ext_ampa*s_ext*(v-E_ampa) : amp
ds_ext/dt=-s_ext/t_ampa : 1
'''
eqs_rho = '''
dv/dt = I_ampa/Cm +((-I*R_m)+E_m-v)/tau_m : volt
I_ampa=-g_ext_ampa*s_ext*(v-E_ampa) : amp
ds_ext/dt=-s_ext/t_ampa : 1
'''+ RhO.brian_phi_t
netParams = {'t_ampa':2*ms, 'Cm':0.5*nF, 'E_ampa':0.0*mV, 'g_ext_ampa':3.1*nS,'vt':-60*mV,'vr':-70*mV,'w':1,'E_m':-70*mV,'tau_m':10*ms, 'R_m':70*Mohm}
E_ampa=0.0*mV
neuron = NeuronGroup(100, eqs, threshold='v>vt', reset='v=vr')
neuron_rho=NeuronGroup(100,eqs_rho,threshold='v>vt',reset='v=vr',name='Inputs')
neuron.v = -10*mV
neuron.s_ext = 0
spikes_gen=SpikeGeneratorGroup(1000,list(cell_identity),spikes*1000*ms)
w = 1
S = Synapses(spikes_gen, neuron, on_pre='s_ext += w')
S.connect(p=0.1)
S = Synapses(spikes_gen, neuron_rho, on_pre='s_ext += w')
S.connect(p=0.1)
S = Synapses(neuron_rho, neuron, on_pre='s_ext += w')
S.connect(p=0.5)
# Record the spikes
Mgp = SpikeMonitor(neuron)
Mgp_rho = SpikeMonitor(neuron_rho)
Minput = SpikeMonitor(spikes_gen)
monitors={'states' : StateMonitor(neuron_rho, RhO.brianStateVars, record=0), 'I': StateMonitor(neuron_rho, 'I', record=0), # Record current
'spikes':[Mgp,Mgp_rho,Minput]}
import time
start=time.time()
import brian2 as br
net = br.Network(br.collect())
net.add(monitors.values())
Sim = simulators['Brian'](Prot, RhO, simParams['Brian'], net, netParams, monitors)
Sim.run()
Sim.plot()
end=time.time()
print(end-start)
Any help would be appreciated! No idea really what's going on!
All the very best,
Maria
Line 296 in f62af03
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.