Alert algorithm
- Get the latest X-Ray data from the MySQL database.
- 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, .
- 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.
- Calculate the average value and standard deviation for these data.
- 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.
- If the number of pre-alert points is equal to the predefined value (3 points), put the current monitor in Alert state.
- Check if this was the last monitor in the list, if yes than continue, otherwise repeat points 3-6 for the next monitor.
- If all monitors are in Alert state, generate Alert message and send emails to the operators and stop the operation of the program.
- If the number of post-flare minutes is less than predefined value (120 minutes), go to point 3.
- Stop the program and send notification to the operators.