-- ERROR --
-----------------> BLESK ver.2021-02-27 run on Fri Jan  5 22:39:01 2024 UTC
-- File 20230720_172124_1229.dat, 5357  packets found.
APID:
      1229 (EW) in 5357 packets (all packets)
Mode:
      1 (EBEW-SRSL) in 5357 packets (all packets)
Total number of packets: 
      36720 in 5357 packets (all packets)
Packet No from 1 to 5357
!!!ERROR: Maximum packet number must be = 36720
   Sequence of packet numbers -- OK -- 
!!!ERROR: Last packet number must be = 36720
Hz and MHz counters from 26.562588 to 28.383295
-each separately from 26s to 28s and from 383295us to 562588us.
   Differences in neigboring packets: 
      0.000000 in 5355 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      -1.820707 in 1 packets: 1428
MIU packet time from 2023-07-20T17:21:53.562.588.000 to 2023-07-20T17:21:55.383.295.000
   Differences in neigboring packets: 
      0.000000 in 5355 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      -1.820707 in 1 packets: 1428
MIU orbit number: 
      60000 in 5357 packets (all packets)
MIU orbit information / directon: 
      0 (DOWN) in 5357 packets (all packets)
MIU orbit information / number of events: 
      0 in 5357 packets (all packets)
Waveform overflows in 306us: 
      0 (none) in 5357 packets (all packets)
Instrument anomalies: 
      0 (OK) in 5357 packets (all packets)
FPGA configuration version: 
      211 in 5357 packets (all packets)
10 MHz counter at the last 1Hz pulse from 27.8634896 to 29.8634825
   Differences in neigboring packets: 
      0.0000000 in 5355 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      -1.9999929 in 1 packets: 1428
Temperature FPGA: 
      00 -> 55.0 degC in 1428 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      FF -> 56.3 degC in 3929 packets: 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, ...
Temperature XO: 
      C5 -> 43.6 degC in 5357 packets (all packets)
Temperature ant 3: 
      01 -> 108.0 degC in 5357 packets (all packets)
Temperature ant 4: 
      01 -> 108.0 degC in 5357 packets (all packets)
Number of external events: 
      3 in 1428 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      2 in 3929 packets: 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, ...
Number of generated alerts: 
      3 in 1428 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      2 in 3929 packets: 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, ...
Survey memory error: 
      0 in 5357 packets (all packets)
Event memory error: 
      0 in 5357 packets (all packets)
Configuration error: 
      0 in 5357 packets (all packets)
SDRAM CRC error: 
      0 in 5357 packets (all packets)
Radio gain: 
      0 in 5357 packets (all packets)
Radio bandwidth: 
      0 in 5357 packets (all packets)
Digital gain: 
      0 in 5357 packets (all packets)
Analog gain: 
      0 in 5357 packets (all packets)

EVENT DATA READER
-- File 20230720_172124_1229.dat, 26 EW pages found. Extra packets: 53.
   ERROR -  Extra packets
   Design version: 211 => Data interpreted as:   Pre-final (EM4-FM1) data structure with variable 32bit C10MHz in the event data descriptor
--
Data structure of all event data packets in the sequence read from file:
   Event numbers from 2 to 3
      3 in 1428 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      2 in 3876 packets: 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, ...
   LS 32 bits of C10MHz from descriptor (period 430s)  from 28.3705911 to 30.2155501
      Difference between the neighboring packets: 
      0.0000170 in 5302 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      -1.8449590 in 1 packets: 1428
   Memory page number from 14 to 39
      Difference between the neighboring packets: 
      0 in 5278 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      1 in 25 packets: 204, 408, 612, 816, 1020, 1224, 1428, 1632, 1836, 2040, 2244, 2448, 2652, 2856, 3060, 3264, 3468, 3672, ...
   Event page number from 1 to 19
      Difference between the neighboring packets: 
      0 in 5278 packets: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
      1 in 24 packets: 204, 408, 612, 816, 1020, 1224, 1632, 1836, 2040, 2244, 2448, 2652, 2856, 3060, 3264, 3468, 3672, 3876, ...
      -6 in 1 packets: 1428
   MIU event flag 
      1 in 5304 packets (all packets)
   Time triggered event flag 
      0 in 5304 packets (all packets)
   Absolute time of the 1st EW sample = header abs. time + offset - one page (3.468 ms) - 175 ns delay
   Min EW event (1st sample) abs. time found among all events: 2023-07-20T17:21:53.507.099.631
   Min EW header abs. time found among all events            : 2023-07-20T17:21:53.562.588.000
   Max EW event (1st sample) abs. time found among all events: 2023-07-20T17:21:55.327.806.631
   Max EW header abs. time found among all events            : 2023-07-20T17:21:55.383.295.000
   TM values from -312 to 253 median:-4.00000
--
Data structure of separate events (selected and re-ordered from the packet sequence):

 Event no. 1 total number of packets: 0
   No packets in this event  -- NOT OK -- 

 Event no. 2 total number of packets: 3876
    Page no. 1:  204 packets  -- OK;  memory page(s):
      21 in 204 packets (all packets)  --OK-- 
    Page no. 2:  204 packets  -- OK;  memory page(s):
      22 in 204 packets (all packets)  --OK-- 
    Page no. 3:  204 packets  -- OK;  memory page(s):
      23 in 204 packets (all packets)  --OK-- 
    Page no. 4:  204 packets  -- OK;  memory page(s):
      24 in 204 packets (all packets)  --OK-- 
    Page no. 5:  204 packets  -- OK;  memory page(s):
      25 in 204 packets (all packets)  --OK-- 
    Page no. 6:  204 packets  -- OK;  memory page(s):
      26 in 204 packets (all packets)  --OK-- 
    Page no. 7:  204 packets  -- OK;  memory page(s):
      27 in 204 packets (all packets)  --OK-- 
    Page no. 8:  204 packets  -- OK;  memory page(s):
      28 in 204 packets (all packets)  --OK-- 
    Page no. 9:  204 packets  -- OK;  memory page(s):
      29 in 204 packets (all packets)  --OK-- 
    Page no. 10:  204 packets  -- OK;  memory page(s):
      30 in 204 packets (all packets)  --OK-- 
    Page no. 11:  204 packets  -- OK;  memory page(s):
      31 in 204 packets (all packets)  --OK-- 
    Page no. 12:  204 packets  -- OK;  memory page(s):
      32 in 204 packets (all packets)  --OK-- 
    Page no. 13:  204 packets  -- OK;  memory page(s):
      33 in 204 packets (all packets)  --OK-- 
    Page no. 14:  204 packets  -- OK;  memory page(s):
      34 in 204 packets (all packets)  --OK-- 
    Page no. 15:  204 packets  -- OK;  memory page(s):
      35 in 204 packets (all packets)  --OK-- 
    Page no. 16:  204 packets  -- OK;  memory page(s):
      36 in 204 packets (all packets)  --OK-- 
    Page no. 17:  204 packets  -- OK;  memory page(s):
      37 in 204 packets (all packets)  --OK-- 
    Page no. 18:  204 packets  -- OK;  memory page(s):
      38 in 204 packets (all packets)  --OK-- 
    Page no. 19:  204 packets  -- OK;  memory page(s):
      39 in 204 packets (all packets)  --OK-- 
   Event no. 2 pages: 19  ordered packets: 3876
   TM values from -312 to 253 median: -4.00000
   1Hz and 1MHz counters -- OK -- (constant for all packets of this event):
          C1Hz=26 C1MHz=0.562588
   Differences of   LS 32 bits of C10MHz from descriptor (period 430s)  in neigboring packets of this event: 
      0.0000170 in 3875 packets (all packets)
      -- OK -- correct differences for all packets of this event
         LS 32 bits of C10MHz from descriptor (period 430s)  in the first packet of this event: 28.3705911
   Event type -- OK -- (constant for all packets of this event): External
   Gain -- OK -- (constant for all packets of this event): 1x
   Header abs. time  -- OK -- (constant for all packets of this event): 2023-07-20T17:21:53.562.588.000
   Event 1st sample abs. time : 2023-07-20T17:21:53.507.099.631)
   --- Rel. time correction for 1 points based on 14 XO calibration points at 1Hz counter from 0 to 13
   --- First point: 1Hz counter = 26, 32bit 10MHz counter = 28.370591100 corrected by 40bit 10MHz counter of 14.863535800 obtained at 1Hz counter of 13. Result: 26.507102575
   XO time of the 1st EW sample = data descriptor XO time - 175 ns delay
   Event 1st sample XO time (reconstructed seconds from XP start):              26.507102400
   Event data descriptor XO time (reconstructed seconds from XP start)    :              26.507102575
   Sampling frequency correction factor for this event:     0.999996500

 Event no. 3 total number of packets: 1428
    Page no. 1:  204 packets  -- OK;  memory page(s):
      14 in 204 packets (all packets)  --OK-- 
    Page no. 2:  204 packets  -- OK;  memory page(s):
      15 in 204 packets (all packets)  --OK-- 
    Page no. 3:  204 packets  -- OK;  memory page(s):
      16 in 204 packets (all packets)  --OK-- 
    Page no. 4:  204 packets  -- OK;  memory page(s):
      17 in 204 packets (all packets)  --OK-- 
    Page no. 5:  204 packets  -- OK;  memory page(s):
      18 in 204 packets (all packets)  --OK-- 
    Page no. 6:  204 packets  -- OK;  memory page(s):
      19 in 204 packets (all packets)  --OK-- 
    Page no. 7:  204 packets  -- OK;  memory page(s):
      20 in 204 packets (all packets)  --OK-- 
   Event no. 3 pages: 7  ordered packets: 1428
   TM values from -281 to 211 median: -4.00000
   1Hz and 1MHz counters -- OK -- (constant for all packets of this event):
          C1Hz=28 C1MHz=0.383295
   Differences of   LS 32 bits of C10MHz from descriptor (period 430s)  in neigboring packets of this event: 
      0.0000170 in 1427 packets (all packets)
      -- OK -- correct differences for all packets of this event
         LS 32 bits of C10MHz from descriptor (period 430s)  in the first packet of this event: 30.1912911
   Event type -- OK -- (constant for all packets of this event): External
   Gain -- OK -- (constant for all packets of this event): 1x
   Header abs. time  -- OK -- (constant for all packets of this event): 2023-07-20T17:21:55.383.295.000
   Event 1st sample abs. time : 2023-07-20T17:21:55.327.806.631)
   --- Rel. time correction for 1 points based on 14 XO calibration points at 1Hz counter from 0 to 13
   --- First point: 1Hz counter = 28, 32bit 10MHz counter = 30.191291100 corrected by 40bit 10MHz counter of 14.863535800 obtained at 1Hz counter of 13. Result: 28.327808947
   XO time of the 1st EW sample = data descriptor XO time - 175 ns delay
   Event 1st sample XO time (reconstructed seconds from XP start):              28.327808772
   Event data descriptor XO time (reconstructed seconds from XP start)    :              28.327808947
   Sampling frequency correction factor for this event:     0.999996500
--
Extremes in separate events:

 - Event number: 1 --EMPTY-- 

 - Event number: 2 from 2023-07-20T17:21:53.507.099.631 to 2023-07-20T17:21:53.572.991.861 (XO: 26.507102400 - 26.572994630)
   Min TM value:-312 at an offset of 52792.922 usec -> 2023-07-20T17:21:53.559.892.553 (XO: 26.559895322)
   Max TM value:253 at an offset of 42866.263 usec -> 2023-07-20T17:21:53.549.965.893 (XO: 26.549968662)
   Max dTM/dt [1/us]:2.45e+03 at an offset of 42795.975 usec -> 2023-07-20T17:21:53.549.895.605 (XO: 26.549898375)
   Min dTM/dt [1/us]:-2.40e+03 at an offset of 62860.945 usec -> 2023-07-20T17:21:53.569.960.576 (XO: 26.569963345)
   Med: -4.00000   Ave: -4.4689822   Std: 14.934509

 - Event number: 3 from 2023-07-20T17:21:55.327.806.631 to 2023-07-20T17:21:55.352.082.715 (XO: 28.327808772 - 28.352084857)
   Min TM value:-281 at an offset of 22143.378 usec -> 2023-07-20T17:21:55.349.950.008 (XO: 28.349952150)
   Max TM value:211 at an offset of 2101.220 usec -> 2023-07-20T17:21:55.329.907.850 (XO: 28.329909992)
   Max dTM/dt [1/us]:2.12e+03 at an offset of 22143.490 usec -> 2023-07-20T17:21:55.349.950.121 (XO: 28.349952262)
   Min dTM/dt [1/us]:-2.43e+03 at an offset of 2126.820 usec -> 2023-07-20T17:21:55.329.933.450 (XO: 28.329935592)
   Med: -4.00000   Ave: -4.3991679   Std: 19.567194
