728x90
반응형
🙆♂️ 라이브러리 로드
h 모듈에서도 시뮬레이션 기능을 제공하지만 더 높은 사양을 위해서 stdrun 라이브러리를 로드해야 합니다.
h.load_file('stdrun.hoc')
로드 후 run을 했을 때 1.0이 보인다면 잘 로드가 된 것입니다.
h.finitialize(-65)
휴지 전위 상태의 막 전위 값을 -65로 설정하기 위해서 finitialize 함수를 사용합니다.
설정 수치는 -65mV입니다.
h.continuerun(40)
그리고 시뮬레이션 지속 시간을 40ms로 설정할 수 있습니다.
from neuron import h
soma = h.Section(name='soma')
soma.L = 20
soma.diam = 20
soma.insert('hh')
mech = soma(0.5).hh
stim = h.IClamp(soma(0.5))
stim.delay = 2
stim.dur = 0.1
stim.amp = 0.9
v = h.Vector().record(soma(0.5)._ref_v)
t = h.Vector().record(h._ref_t)
h.load_file('stdrun.hoc')
h.finitialize(-65)
h.continuerun(40)
현재까지의 튜토리얼 최종 코드입니다.
728x90
반응형
'AI > neuron' 카테고리의 다른 글
[neuron][파이썬] 09. 결과 저장하고 불러오기 - Saving and loading results (0) | 2022.07.20 |
---|---|
[neuron][파이썬] 08. 결과 표시 - Plot the results (0) | 2022.07.20 |
[neuron][파이썬] 06. 기록 변수 설정 - Set up recording variables (0) | 2022.07.20 |
[neuron][파이썬] 05. 자극 입력 - Insert a stimulus / (Add point process) (0) | 2022.07.20 |
[neuron][파이썬] 04. 이온 채널 입력 - Insert ion channels (0) | 2022.07.20 |