728x90
반응형
반응형
🙆♂️소개
파트 B에서는 다중 compartmental 뉴런을 구축하고 다양한 그래프를 활용하여 보여주는 실습을 합니다.
여기서 수상돌기와 같은 추가 섹션을 만들고 연결하는 방법과 데이터를 동적 그래프인 공간에 표시하는 방법을 알아봅니다.
🙋♂️모델 만들기 - Build Model
먼저 soma 모델과 dendrite 모델을 만듭니다.
soma = h.Section(name="soma")
soma.L = 10 # µm
soma.diam = 10 # µm
soma.Ra = 100
soma.insert('pas')
soma.g_pas = 1/10000 # 1/Rm - Rm ohm*cm^2
dend = h.Section(name="dend")
dend.L = 500 # µm
dend.diam = 1 # µm
dend.Ra = 100 # ohm*cm
dend.insert('pas')
dend.g_pas = 1/10000
dend.connect(soma, 1, 0) #connect the end of the soma to the start of the dendrite
세포체는 길이가 10 µm, 지름이 10 µm인 구 형태고 축 저항이 100에 passive 매커니즘을 입력했습니다.
수상돌기는 길이가 500 µm, 지름이 1 µm인 원기둥 형태이고 나머지는 soma와 같습니다.
현재는 각각의 존재로 존재해 있는데 둘을 연결하기 위해서는 connect 속성을 사용해야 합니다.
dend.connect(soma, 1, 0) #connect the end of the soma to the start of the dendrite
h("forall { nseg = int((L/(0.1*lambda_f(100))+0.9)/2)*2 + 1 }")
연결 전에 nseg 값을 지정해주는 것도 하나의 팁입니다.
🤷♂️ stim 지정 및 기록 - set up experiment
stim = h.IClamp(soma(0.5)) # add a current clamp the the middle of the soma
stim.delay = 10 # ms
stim.dur = 100 # ms
stim.amp = 0.1 # nA
soma_v = h.Vector() # set up a recording vector
soma_v.record(soma(0.5)._ref_v) # record voltage at the middle of the soma
# Record voltage from all segments in the dendrite
dend_vs = []
for seg in dend:
dend_vs.append(h.Vector())
dend_vs[-1].record(seg._ref_v)
t = h.Vector()
t.record(h._ref_t) #record time.
h.v_init = -70 # set starting voltage
h.tstop = 200 # set simulation time
h.run(); # run simulation
특이한 부분은 dendrite의 세그멘트들을 다 기록합니다.
🧏♂️ plot하기
plt.figure(figsize=(8,5))
plt.plot(t, soma_v,color='k',label='soma(0.5)')
for i,v in list(enumerate(dend_vs))[::3]:
plt.plot(t, v, color=(0,0,0.5+0.5*i/len(dend_vs)),
label = 'dend({:.2})'.format(i/len(dend_vs)))
plt.xlim(0,200)
plt.xlabel('Time (ms)', fontsize = 15)
plt.ylabel('Voltage (mV)', fontsize = 15)
plt.legend(fontsize = 14, frameon=False)
plt.tight_layout()
dendrite의 모든 seg값들을 나타내서 비교합니다.
728x90
반응형
'AI > neuron' 카테고리의 다른 글
[neuron][파이썬] 22. BallAndStick 여러가지 실험 (0) | 2022.07.31 |
---|---|
[neuron][파이썬] 19. 뉴런 병렬 통신 - Parallel communication in NEURON (0) | 2022.07.28 |
[neuron][파이썬] 21. 깃헙 뉴런 튜토리얼 - Single compartment neuron model (0) | 2022.07.27 |
[neuron][파이썬] 18. 확장된 링 네트워크 (0) | 2022.07.25 |
[neuron][파이썬] 17. 링 네트워크 시뮬레이션 실행 및 출력 (0) | 2022.07.22 |