mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-21 21:04:36 +02:00
Make output of file comparison tool more info
This commit is contained in:
@@ -33,15 +33,30 @@ def main():
|
||||
pulse_id = input_pulse_id[i][0]
|
||||
frame_index = input_frame_index[i][0]
|
||||
daq_rec = input_daq_rec[i][0]
|
||||
is_good_frame = input_is_good_frame[i][0]
|
||||
is_good_frame = bool(input_is_good_frame[i][0])
|
||||
|
||||
meta, data = reader.read_pulse_id(pulse_id)
|
||||
|
||||
print(pulse_id, meta.pulse_id)
|
||||
print(frame_index, meta.frame_index)
|
||||
print(daq_rec, meta.daq_rec)
|
||||
print(is_good_frame, meta.is_good_frame)
|
||||
if pulse_id != meta["pulse_id"]:
|
||||
print("pulse_id mismatch",
|
||||
"expected", pulse_id, "got", meta["pulse_id"])
|
||||
|
||||
if frame_index != meta["frame_index"]:
|
||||
print("frame_index mismatch"
|
||||
"expected", frame_index, "got", meta["frame_index"])
|
||||
|
||||
if daq_rec != meta["daq_rec"]:
|
||||
print("daq_rec mismatch"
|
||||
"expected", daq_rec, "got", meta["daq_rec"])
|
||||
|
||||
if is_good_frame != meta["is_good_frame"]:
|
||||
print("is_good_frame mismatch"
|
||||
"expected", is_good_frame, "got", meta["is_good_frame"])
|
||||
|
||||
numpy.testing.assert_array_equal(input_data[i], data)
|
||||
|
||||
print("pulse_id", pulse_id, "verification completed.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user