The OpenSeizureDetector Android App saves alarm events (warnings and full alarms) to the phone’s SD memory card by default. You can switch this on, or extend the facility by having it write data regularly even if an alarm does not occur. The information below gives some information on how to access the log files, and how to interpret the data.
Log File Set Up
From the main OpenSeizureDetector screen, use the menu to access the settings page, and select the “General – General Preferences” option. You should see otpions to “Log Alarm events to SD Card” and “Log Data to SD Card”.
Make sure the “Log Alarm events to SD Card” is selected if you want logs to investigate false alarms.
If you are concerned about failure to detect actual seizures you will need to select “Log Data to SD Card”, and hope that a seizure occurs at one of the times it records the data (it does it every minute so there is a pretty good chance).
Use the back button to get back to the OpenSeizureDetector main screen – the app will re-start if you have changed anything.
Accessing the Log Files
You need to use a wifi connection between a computer and the phone to access the log files. On the main screen you see a statement “Access Server at http://xxx.xxx.xxx.xxx:8080 (where xxx are numbers that depend on your home wifi settings).
The photo on the right shows our home set-up for Benjamin where the server address is http://192.168.1.170:8080.
Type this address into the address bar of a web browser:
This should open up a very simple web page. Scroll down to the bottom of the page and you should see some de-bugging information at the very bottom, and a small ‘Logs’ button at the left hand side of the page:
Pressing the Logs button shows you a list of all of the log files on the phone (there is one per day)
View the log file by RIGHT CLICKING on the file and selecting either ‘Save As’ or ‘Open in New Tab / Window’.
*** It is an unfortunate ‘Feature’ that if you left click on the log file name you get a blank screen until you press the browser’s Refresh button, sorry!!! ****
Interpreting the Log Files
The log files are simple text files, but they are in a machine readable format called JSON, so take a bit of thinking about.There is one line per event (warning or alarm initiation). It will look something like:
This looks a bit like gibberish, but if you add new lines after the commas, and do some indenting, it looks easier:
That is, it s a set of key:value pairs – here AlarmFreqMin is 3 etc. I have highlighted in bold the parameters that are most interesting from the perspective of looking for false alarms.
AlarmFreqMin and AlarmFreqMax define the frequency range of the Region of Interest (ROI) that we use to detect seizures – the narrower this range the more specific we are being about what frequency of movement we will call a seizure. You can use the SimpleSpec figures which is the amount of movement in 1Hz steps to see how suited these figures are to the movement being detected.
ROIPower is the level of movement detected within the region of interest frequency range. SpecPower is the level of movement in the whole spectrum.
Here we had values of 206 and 26, so the ratio is 206/26 = 7.9. Because we only use integers on the Pebble watch, we mutiply by 10 to give 79 for the ratio.
The AlarmRatioThresh value is 50, so the reason the system is alarmed is that the actual ratio is 79 compared to the threshold of 50.
See the Seizure Detection Algorithm page for a bit more information.