Skip to content

Commit

Permalink
fix correlation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Oct 4, 2024
1 parent 66f8406 commit 8d540c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/spikeanalysis/spike_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ def get_raw_firing_rate(
self.fr_bins[stim] = bins[fr_window_values]
self.mean_firing_rate = final_fr

def zscore_data(self, time_bin_ms, bsl_window, z_window, eps):

self.z_score_data(time_bin_ms=time_bin_ms, bsl_window=bsl_window, z_window=z_window, eps=eps)

def z_score_data(
self,
time_bin_ms: Union[list[float], float],
Expand Down Expand Up @@ -734,6 +738,7 @@ def trial_correlation(
data = getattr(self, "psths")
elif dataset == "raw":
data = getattr(self, "raw_firing_rate")
bins = self.fr_bins
elif dataset == "z_scores":
data = getattr(self, "raw_zscores")
bins = self.z_bins
Expand Down

0 comments on commit 8d540c3

Please sign in to comment.