tests, correct stimulus-type for fi-curve, general changes

This commit is contained in:
a.ott
2020-03-11 18:03:21 +01:00
parent 15166042be
commit 6012927416
14 changed files with 460 additions and 149 deletions

View File

@@ -4,6 +4,26 @@ import helperFunctions as hF
import time
def main():
time = np.arange(-1, 30, 0.0001)
eod = np.sin(2*np.pi * 600 * time)
signs = np.sign(eod[:-1]) != np.sign(eod[1:])
delta = eod[:-1] < eod[1:]
sign_changes = np.where(signs & delta)[0]
plt.plot(time, eod)
plt.plot([time[i] for i in sign_changes], [0]*len(sign_changes), 'o')
plt.show()
print(sign_changes)
quit()
for freq in [700, 50, 100, 500, 1000]:
reps = 1000
start = time.time()
@@ -57,9 +77,4 @@ def abs_phase_diff(rel_phases:list, ref_phase:float):
if __name__ == '__main__':
print(-2.4%0.35, (int(-2.4/0.35)-1)*0.35)
hF.calculate_isi_frequency_trace([0, 2, 1, 3], 0.5)
#main()
main()