Commit 1b1d25ee authored by Maximilian Schuette's avatar Maximilian Schuette 🌃
Browse files

Renamed parse_timing_pattern_packed to unpack_timing_pattern

parent 66c5f085
......@@ -7,7 +7,7 @@
# from mcxdaqtools.DaqTimingPatter import parse_timing_pattern_packed
#
# with h5py.File('sample.hdf5', 'r') as file:
# bunch_pattern = parse_timing_pattern_packed(file['XFEL.DIAG/TIMINGINFO/TIME1.BUNCH_PATTERN/Value'][0])
# bunch_pattern = unpack_timing_pattern(file['XFEL.DIAG/TIMINGINFO/TIME1.BUNCH_PATTERN/Value'][0])
# plt.figure()
# plt.plot(bunch_pattern.destination[::4])
# plt.yticks([e.value for e in DestinationXfel], [e.name for e in DestinationXfel])
......@@ -147,7 +147,7 @@ timing_pattern_type = {linac: np.dtype([('bunch_charge_setting', BunchChargeSett
('special_flags', SpecialFlags[linac])]) for linac in LINACS}
def parse_timing_pattern_packed(value, linac=LINACS[0]):
def unpack_timing_pattern(value, linac=LINACS[0]):
if not isinstance(linac, str) or linac.lower() not in LINACS:
raise TypeError(f"`mode` must be either of {LINACS}")
......
Supports Markdown
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