Skip to content

Commit

Permalink
Update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Oct 23, 2023
1 parent bab251a commit 65c7c6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions snudda/detect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2304,11 +2304,14 @@ def load_neuron(self, neuron_info, use_cache=True):
if use_cache and neuron_id in self.neuron_cache:
return self.neuron_cache[neuron_id]

if os.path.isfile(snudda_parse_path(neuron_info["morphology"], self.snudda_data)):
morphology_path = neuron_info["morphology"]
morph_path = snudda_parse_path(neuron_info["morphology"], self.snudda_data)
if os.path.isfile(morph_path):
morphology_path = morph_path
else:
morphology_path = None # Get morpholog automatically from morphology_key

print(f"morphology_path = {morphology_path}")

# Clone prototype neuron (it is centred, and not rotated)
neuron = self.prototype_neurons[neuron_info["name"]].clone(parameter_key=neuron_info["parameterKey"],
morphology_key=neuron_info["morphologyKey"],
Expand Down
5 changes: 3 additions & 2 deletions snudda/plotting/plot_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ def load_neuron(self, neuron_info=None, neuron_id=None):
load_morphology=True,
virtual_neuron=False)

if os.path.isfile(snudda_parse_path(neuron_info["morphology"], self.snudda_data)):
morphology_path = neuron_info["morphology"]
morph_path = snudda_parse_path(neuron_info["morphology"], self.snudda_data)
if os.path.isfile(morph_path):
morphology_path = morph_path
else:
morphology_path = None # Get morpholog automatically from morphology_key

Expand Down

0 comments on commit 65c7c6c

Please sign in to comment.