Skip to content

Commit e878872

Browse files
committed
Changed meanrt and meanacc attributes to mean_rt and mean_accuracy.
1 parent af3732d commit e878872

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

rtanalysis/rtanalysis.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def __init__(self, outlier_cutoff_sd=None):
1818
Standard deviation cutoff for long RT outliers, by default None
1919
"""
2020
self.outlier_cutoff_sd = outlier_cutoff_sd
21-
self.meanrt_ = None
22-
self.meanacc_ = None
21+
self.mean_rt_ = None
22+
self.mean_accuracy_ = None
2323

2424
def fit(self, rt, accuracy, verbose=True):
2525
"""Fit response time to accuracy.
@@ -57,18 +57,18 @@ def fit(self, rt, accuracy, verbose=True):
5757
print(f"outlier rejection excluded {(rt > cutoff).sum()} trials")
5858
rt = rt.mask(rt > cutoff)
5959

60-
self.meanacc_ = accuracy.mean()
60+
self.mean_accuracy_ = accuracy.mean()
6161
try:
62-
assert self.meanacc_ > 0
62+
assert self.mean_accuracy_ > 0
6363
except AssertionError as e:
6464
raise ValueError("accuracy is zero") from e
6565

6666
rt = rt.mask(~accuracy)
67-
self.meanrt_ = rt.mean()
67+
self.mean_rt_ = rt.mean()
6868

6969
if verbose:
70-
print(f"mean RT: {self.meanrt_}")
71-
print(f"mean accuracy: {self.meanacc_}")
70+
print(f"mean RT: {self.mean_rt_}")
71+
print(f"mean accuracy: {self.mean_accuracy_}")
7272

7373
@staticmethod
7474
def _ensure_series_type(var):

0 commit comments

Comments
 (0)