diff --git a/snudda/neurons/morphology_data.py b/snudda/neurons/morphology_data.py index 7b76fb23f..a1f58f1ca 100644 --- a/snudda/neurons/morphology_data.py +++ b/snudda/neurons/morphology_data.py @@ -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). diff --git a/snudda/neurons/neuron_model_extended.py b/snudda/neurons/neuron_model_extended.py index dd0895e68..38e508589 100644 --- a/snudda/neurons/neuron_model_extended.py +++ b/snudda/neurons/neuron_model_extended.py @@ -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 diff --git a/snudda/simulate/simulate.py b/snudda/simulate/simulate.py index 95858c207..4b9ddc383 100644 --- a/snudda/simulate/simulate.py +++ b/snudda/simulate/simulate.py @@ -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):