Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Oct 26, 2023
1 parent faf1d69 commit 393803f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions snudda/neurons/morphology_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ def section_iterator_selective(self, section_type, section_id):
for sid in section_id:
yield self.sections[section_type][sid]

def has_axon(self):
return len(self.sections[2]) > 0

def has_dendrite(self):
return len(self.sections[3]) > 0

def load_swc_file(self, swc_file=None, remapping_types={4: 3}, use_cache=True):

""" Loads SWC morphology, not SNUDDA_DATA aware (file must exist).
Expand Down
4 changes: 0 additions & 4 deletions snudda/neurons/neuron_model_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ def build_section_lookup(self):
# Soma is -1
self.section_lookup[-1] = self.icell.soma[0]

# Dendrites are consecutive numbers starting from 1
# Ie neurons dend(0) is in pos 1, dend(99) is in pos 100
# This so we don't need to special treat soma (pos 0)

for ic, c in enumerate(self.icell.dend):
self.section_lookup[ic] = c

Expand Down
2 changes: 1 addition & 1 deletion snudda/simulate/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ def add_volt_recording_soma(self, cell_id=None):
for cid in cell_id:

if cid in self.neurons.keys() and not self.is_virtual_neuron[cid]:
self.add_volt_recording(cid, [0], [0.5])
self.add_volt_recording(cid, [-1], [0.5]) # Soma is sec_id=-1

def add_volt_recording(self, cell_id: int, sec_id, sec_x):

Expand Down

0 comments on commit 393803f

Please sign in to comment.