This module contains tools for simulating models against human phase response curve data.
model = Hannay19()light_schedule = LightSchedule.Regular(lux=1000.0)time = np.arange(0.0, 24.0, 0.10) light = light_schedule(time)initial_conditions = model.equilibrate(time, input=light, num_loops=100)phases = [] shifts = [] for cr in PRCFinder().type0x: phase,shift = PRCFinder.prc_type0_point(cr, initial_conditions, model) phases.append(phase)if shift >12.0: shift -=24.0 shifts.append(shift)xVals = np.arange(0,24,0.1)yVals = np.array([PRCFinder.exp_type0(x, 10.0) for x in xVals])plt.scatter(phases, shifts, color='black');plt.plot(xVals, yVals, color='black', ls='--');plt.title("Type 0 Human PRC");plt.xlabel("Phase") plt.ylabel("Phase Shift")
C:\Users\tavel\AppData\Local\Temp\ipykernel_14516\3293739244.py:26: RuntimeWarning: divide by zero encountered in scalar divide
val=(-1.57154+0.228932/(-1.0*b+x)-0.650632*x)*heaviside(b-x)+(9.66876+0.1321196/(-1.0*b+x)-0.463105*x)*heaviside(x-b)