728x90
반응형
🙆♂️ soma와 dend 연결
soma와 dend를 연결하기 위해서는 역시 class 속 함수의 내용을 바꿔줘야 합니다.
class BallAndStick:
def __init__(self, gid):
self._gid = gid
self.soma = h.Section(name='soma', cell=self)
self.dend = h.Section(name='dend', cell=self)
self.dend.connect(self.soma)
def __repr__(self):
return 'BallAndStick[{}]'.format(self._gid)
connect 메소드를 사용해서 연결해줄 수 있습니다.
지금 상황은 완전하게 연결된 것은 아니고 soma가 끝나는 지점에 dend가 시작되어서 연결된 것처럼 보이게 합니다.
확인해보면 이렇게 연결된 것처럼 나옵니다.
만들었던 섹션은 del로 삭제할 수 있습니다.
del my_cell2
del로 한번 삭제해주고 다시 조회하면 삭제된 모습을 볼 수 있습니다.
soma에는 많은 dendrites를 붙일 수 있습니다. 이 때 dendrites는 특정 위치를 지정해줘야 합니다.
728x90
반응형
'AI > neuron' 카테고리의 다른 글
[neuron][파이썬] 13. 생물학 값 특정하기 - Specify biophysics (0) | 2022.07.21 |
---|---|
[neuron][파이썬] 12. 스타일 정의 - Define stylized geometry (0) | 2022.07.21 |
[neuron][파이썬] 10. 여러 섹션 만들기 - Create the sections (0) | 2022.07.21 |
[neuron][파이썬] 09. 결과 저장하고 불러오기 - Saving and loading results (0) | 2022.07.20 |
[neuron][파이썬] 08. 결과 표시 - Plot the results (0) | 2022.07.20 |