Skip to content

Commit

Permalink
Fixing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Jul 18, 2024
1 parent 20a872f commit fc7b47c
Show file tree
Hide file tree
Showing 3 changed files with 23,079 additions and 48 deletions.
23,100 changes: 23,065 additions & 35 deletions examples/parallel/KTH_PDC/neuromodulation/dspn/Dardel_analyse_dspn.ipynb

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion snudda/simulate/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,14 @@ def add_synapse_current_recording(self, source_id, dest_id):

return syn_ctr

def add_rxd_concentration_recording(self, species: str, neuron_id: int, region, sec_type, sec_id, sec_x):
def add_rxd_concentration_recording(self, species: str, neuron_id: int, region, sec_id, sec_x):

if sec_id == -1:
sec_type = "soma"
elif sec_id >= 0:
sec_type = "dend"
else:
sec_type = "axon"

if self.neurons[neuron_id].modulation is None:
raise ValueError(f"No modulation specified for neuron {self.neurons[neuron_id].name} ({neuron_id})")
Expand Down
18 changes: 6 additions & 12 deletions tests/test_neuron_modulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,34 @@ def test_reaction(self):

self.sim.add_rxd_concentration_recording(species="DA", neuron_id=0,
region="soma_internal",
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

self.sim.add_rxd_concentration_recording(species="B", neuron_id=0,
region="soma_internal",
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

self.sim.add_rxd_concentration_recording(species="PKA", neuron_id=0,
region="soma_internal",
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

self.sim.add_density_mechanism_recording(density_mechanism="kirrxd",
variable="modulation_factor",
neuron_id=0,
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

self.sim.add_density_mechanism_recording(density_mechanism="kirrxd",
variable="m",
neuron_id=0,
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

self.sim.add_membrane_recording(variable="PKAi",
neuron_id=0,
sec_type="soma",
sec_id=0,
sec_id=-1,
sec_x=0.5)

# Add DA synapse
Expand Down

0 comments on commit fc7b47c

Please sign in to comment.