Skip to content

Commit

Permalink
Updated figure name if too low freq
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Oct 17, 2024
1 parent 09fc25e commit 1b7cbfd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions snudda/input/input_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,16 @@ def find_signal_strength(self, requested_frequency=10.0, skip_time=0.0, show_plo
for nid in neuron_id:
assert network_info.data["neurons"][neuron_id[0]]["name"] == network_info.data["neurons"][nid]["name"]

# Check if spike frequency is too low, if so give image a different name

if depol_block:
label = f"signal-{requested_frequency}-Hz-BLOCKED"
else:
label = f"signal-{requested_frequency}-Hz"

if np.max(spike_count_mean) < requested_spikes:
label = f"{label}-TOO-LOW-FREQ"

self.plot_signal_info(neuron_id=neuron_id, neuron_info=neuron_info, best_config=best_config,
spike_count=spike_count, input_config=input_config, max_time=np.max(time),
requested_frequency=requested_frequency, depol_block_flag=depol_block_flag,
Expand Down

0 comments on commit 1b7cbfd

Please sign in to comment.