Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ErikHogenbirk/95a33870a1d4c2827325483e63db617c to your computer and use it in GitHub Desktop.
Save ErikHogenbirk/95a33870a1d4c2827325483e63db617c to your computer and use it in GitHub Desktop.
d['s2_bottom'] = d['s2'] * (1 - d['s2_area_fraction_top'])
x_plot = np.linspace(0, 70, 100)
def ly(dt):
return 230 + 0*dt + 0.06*dt**2
avg_s1 = np.average([ly(dt) for dt in np.linspace(0, 59.5, 100)])
def s1_correction(dt_ns, avg_s1):
dt = dt_ns*0.001
return avg_s1 / ly(dt)
d['cs1'] = d['s1'] * s1_correction(d['drift_time'], avg_s1)
plt.plot(x_plot, ly(x_plot))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment