Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Dec 1, 2023
1 parent 1c68d01 commit ffc1785
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions snudda/data/input_config/Kim2019/get_experimental_firing_freq.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import os
import numpy as np


def get_spn_fs_freq():

data_file = "Kim et al., 2019 - Henry Yin - Extended2a.csv"
data_dir = os.path.dirname(__file__)
data_file = os.path.join(data_dir, "Kim et al., 2019 - Henry Yin - Extended2a.csv")

data = np.genfromtxt(data_file, delimiter=",", filling_values=np.nan)
spn_freq, fs_freq = data[:,0], data[:, 1]
spn_freq, fs_freq = data[:, 0], data[:, 1]
fs_freq = fs_freq[~np.isnan(fs_freq)]

return spn_freq, fs_freq


def resample_spn_freq(size, rng=None):

spn_freq, _ = get_spn_fs_freq()
Expand All @@ -21,6 +25,7 @@ def resample_spn_freq(size, rng=None):

return resampled_freq


def resample_fs_freq(size, rng=None):

_, fs_freq = get_spn_fs_freq()
Expand Down Expand Up @@ -48,6 +53,7 @@ def plot_freq_hist(data, title=None, bins=None):
plt.show()
plt.pause(0.1)


if __name__ == "__main__":

spn_freq, _ = get_spn_fs_freq()
Expand All @@ -57,6 +63,4 @@ def plot_freq_hist(data, title=None, bins=None):
plot_freq_hist(resampled_spn_freq, "Resampled SPN frequency", bins=100)

input("Press a key to continue")

#import pdb
# pdb.set_trace()

0 comments on commit ffc1785

Please sign in to comment.