Alert algorithm

  1. Get the latest X-Ray data from the MySQL database.
  2. Check if X-Ray flux was greater than the predefined threshold value (class M4), if yes than continue, otherwise set the counter of post-flare minutes 0 and go to point 1, .
  3. Get the latest data of current monitor with a predefined width of window (120 minutes), set the counter of pre-alert points 0, add 1 to the counter of post-flare minutes.
  4. Calculate the average value and standard deviation for these data.
  5. Check if the value of the latest minute of these data (in number of standard deviations - σ) is greater than predefined threshold (1 σ), if yes than increase the number of pre-alert points by 1, otherwise set it 0.
  6. If the number of pre-alert points is equal to the predefined value (3 points), put the current monitor in Alert state.
  7. Check if this was the last monitor in the list, if yes than continue, otherwise repeat points 3-6 for the next monitor.
  8. If all monitors are in Alert state, generate Alert message and send emails to the operators and stop the operation of the program.
  9. If the number of post-flare minutes is less than predefined value (120 minutes), go to point 3.
  10. Stop the program and send notification to the operators.