maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   All about SleepAnalyser (https://talk.maemo.org/showthread.php?t=57419)

gsever 2010-09-11 23:13

Re: [ANNOUNCE]: SleepAnalyser
 
Quote:

Originally Posted by caco3 (Post 813666)
Hi gsever:
Thanks for the suggestion, I added it to the newest version.

If this version is good, I will move it to testing in some days.

Applauds are for you :) I will give it a try tonight to see if everything is working well.

gsever 2010-09-12 22:21

Re: [ANNOUNCE]: SleepAnalyser
 
3 Attachment(s)
See the screenshots. When I zoom in one-level one bright (deep sleep around 3 AM) green turns to dark green. The rest of the data seem good. Only that part seems different. Any idea? (with version 1.6-51) Also attached the log file.

gsever 2010-09-12 22:28

Re: [ANNOUNCE]: SleepAnalyser
 
2 Attachment(s)
This one for the interpretation of the statistics. See two attached screenshots again. Questions follow:

1-) Where do you set light/middle/deep sleep thresholds and the trigger level and on what basis?

2-) Why do you have AM in the total time column?

3-) Are longest time results correct? They need to be adjusted.

4-) I thought it records 1 entry per 10 seconds but down in the second ss the sampling interval is set at 1000 ms.

5-) What is the difference of sampling and value smoothing?

So many questions, hope to get answers.

caco3 2010-09-16 16:02

Re: [ANNOUNCE]: SleepAnalyser
 
Hi gsever

The change in the coloring is due the rounding. I am avare of it and hope to improve it in one of the later versions. I also know that there are some other minor issues. Right now I am very busy with other things, so I will not do much in the next 1..2 months.

About you other questions:
1) The times are right now hard coded in the code. It only measures the time time between the movements.

2) I use the local representation of the time. So please check how your phone is set up. For more infos, see "%X" in http://docs.python.org/library/time.html#time.strftime

3) Might be wrong, will have to check sometimes

4) Every second (Sampling_interval) it takes 10 (Sample_smoothing) measurements. Always 10 (Value_smoothing) of them are smoothened and stared in the db for evaluation.

5) see 4)

I hope that helps to understand how I do it.
For sure the algorithm could be improved, but that takes a lot of time and testing.

gsever 2010-09-17 17:29

Re: [ANNOUNCE]: SleepAnalyser
 
Quote:

Originally Posted by caco3 (Post 818003)
2) I use the local representation of the time. So please check how your phone is set up. For more infos, see "%X" in http://docs.python.org/library/time.html#time.strftime

3) Might be wrong, will have to check sometimes

Hello,

I still think total and longest times should show only times [Hehe not Enya's Only Time song :D]. Say for instance, my total deep sleeping time is 2 hours (no AM or PM needed here), likewise my longest deep sleep is 1 hour (again no AM or PM.) In other words, these should be absolute calculations.

Could you give us a bump here when you update your tool with the changes. That would be useful for testing :)

Thanks.

caco3 2010-09-19 15:36

Re: [ANNOUNCE]: SleepAnalyser
 
Just fixed point 4.
Please check point 3. I can not reproduce the fault you showed. If it is still wrong, can you send me the record file for testing?

I am going to move this version into testing.
I know there are still some minor glitchs in visualising the time bars an stat, but I will work on that in a later version. It is is still fully usable.

gsever 2010-09-20 15:30

Re: [ANNOUNCE]: SleepAnalyser
 
Hey,

This is 1.6-53 and reported times are all shown as absolute :) Thanks for the fix. I haven't changed anything on my system.

MiSP 2010-09-20 19:58

Re: [ANNOUNCE]: SleepAnalyser
 
Suggestion, perhaps it drowned in the rest of my earlier message: Include a setting to turn off the vibration of the alarm. The vibration through the whole bed is a little bit unsettling, and disabling and enabling vibration manually is a bit tedious. :)

caco3 2010-09-21 09:13

Re: [ANNOUNCE]: SleepAnalyser
 
I will see if i can ad it in the next bigger version.
In the next weeks I do not have time.

Larswad 2010-09-27 21:17

Re: [ANNOUNCE]: SleepAnalyser
 
Really interesting app. If not only used to wake oneself up, it is always interesting to see the family sleep habits. Especially in a family like mine where we have an infant waking up in the night so that we have to bring her into sleep with mom & dad. These activities show up since it is a double-bed.

However, to detect a certain (reoccurring) period during the night in order to trigger some alarm or event, perhaps an auto-correlation algorithm would be the most appropriate. That would be done by correlating continously during the night with some chosen interval of a previously recorded reference (from the same person of course). At least something like that could be experimented with to see if it works.
You would need to tune the detection limit by experimenting with thresholds on the resulting correlation coefficient and amplitude level.

Anyone with a bit of mathematics knowledge; would that be the right way to do it? I strongly believe that would be the right approach, I've used that technique in a project before and it works fantastically well when there is a lot of background noise like here. Maybe autocorrelation algorithms are used in speech-analysis as well, I don't know. This is of course, if we assume that all this sleep analysis stuff is not just bogus.

It's a couple of fft's and a few more calculations to perform continously of course, but that would seriously drain battery (unless the device could be connected to the charger during sleep).

Any comment from the developer ?


All times are GMT. The time now is 17:19.

vBulletin® Version 3.8.8