Commit 6ea47e17 authored by Neil Vaytet's avatar Neil Vaytet
Browse files

Made tof_shifts into member function

parent e3c5e8f9
......@@ -39,8 +39,7 @@ def _wfm_psc_2():
"""
return [65.04, 76.03, 126.1, 141.4, 182.88, 202.18, 235.67, 254.97, 284.73, 307.74, 330.00, 360.0]
def tof_shifts(pscdata, psc_frequency=0):
print(pscdata)
def _tof_shifts(pscdata, psc_frequency=0):
cut_out_centre = np.reshape(pscdata,(len(pscdata)//2, 2)).mean(1)
cut_out_diffs = np.ediff1d(cut_out_centre)
return cut_out_diffs / (360.0*psc_frequency)
......@@ -61,8 +60,8 @@ def get_frame_shifts(frequency_wfm_psc=None):
else:
raise TypeError("Unknown frequency type")
relative_shifts = (tof_shifts(_wfm_psc_1(), psc_frequency=frequ1) + \
tof_shifts(_wfm_psc_2(), psc_frequency=frequ2)) * \
relative_shifts = (_tof_shifts(_wfm_psc_1(), psc_frequency=frequ1) + \
_tof_shifts(_wfm_psc_2(), psc_frequency=frequ2)) * \
5.0e+05
return relative_shifts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment