Tuesday, 8 August 2017

Lake temperature in central Finland








(earlier posts 1,2 on the methods)

Thursday, 15 June 2017

Paternity leave (isyysvapaa) and me as a stay-at-home parent (SAHP) for Jan-June 2017

The 'data' in this post is anomalous - it's qualitative/experiential. I'm not requesting any replies. I just felt the need to write down some of my feelings, opinions and experiences. I thought that others might be interested to read.
I felt that I MUST stay at home for months raising Zadie in order to match our values:
 - for my new family (Zadie and Annika) i.e. we're no longer in 19/20th century forcing mother to stay at home alone for years and go mad;
 - to provide a closer father for Zadie;
 - to be part of modern society where fathers are allowed to be SAHPs too!

According to KELA statistics in Finland, and depending exactly how one defines it, the ratio of SAH Moms/Dads seems to be between about 60/40 and 90/10. This seems about right to me at least based on the families we've seen.

I decided to focus on Zadie - and I'm very grateful I am not using up my energies on domestic things in my 'new job':
 - Cleaning is done by a cleaner twice a month.
 - Groceries are bought on the internet and delivered to our door.
 - I cook only very rarely; otherwise we eat out, or Annika cooks, or we have something light.
 - Laundry I occasionally do during the day, but we normally do it together at evening/weekend.
 - Zadie's clothes, toys, accessories are mostly done by Annika (or together) via flea markets.

If I do have spare time during the day (e.g. Zadie has napped for an hour or more), then I'm glad that I've often had time to do something for myself such as contacting a friend or spending some time on a geeky hobby (delectabledata.blogspot.com).
 - Analysis of Zadie's night-time sleep with the night-vision camera.
 - Automatic logging of lake temperature at the cabin/mökki.

My mental energy has been mostly filled with basic care things like Zadie's sleep, food and safety. It can be hard to remember to have fun with Zadie - when Annika comes home is so lovely to see the two of them often play/laugh together.

SAHP has felt very natural in many ways. Not at all as bad as I was fearing. My 5 months of SAHP has gone by fast. Although it has still been a challenge of course - returning to work will be easy after this! For the SHAP, there are dozens/hundreds of little considerations/tasks/plans. SAHPing can be very emotionally/analytically demanding. I often feel overwhelmed by the constant challenges, changes and failures, e.g. it has often been difficult to get Zadie to spend any time in the pram. SAHPing has been a great opportunity to have a sizeable break from work; I'm excited to see how my work-life changes in the future after this SAHP experience.

I've been more in contact with own feelings:
Happy tears:
 - My first working day with Zadie ('muskari' at Linja).
 - Zadie's first claps.
 - Sometimes just holding her in my arms.
 - Zadie's first steps.
 - When on holiday together - it's lovely the 3 of us.
Anger:
 - I've shouted with anger. Of course I'm not thinking clearly when e.g. I'm tired, I have too high expectations, a 100hr+ working week, and being human. Then follows guilt that this is too much for Zadie. I'm told that this is common in parenting - but somehow this doesn't help me much.

When I'm angry, part of it is really a feeling of fear that I'm a bad father. Of course it is not nice, but it happens. People have emotions. And there is a crumb of positive here in that Zadie gets to see a real/wholehearted/emotional person. Possible mantra: I'm a good-enough father.

Lack of control is annoying. E.g. I've just got Zadie to sleep, then there's a loud sound and it wakes her. Frustrating. Of course it's totally normal to feel disappointed/annoyed/negative in those situations, but it just feels too much sometimes. Though when looking back later that same day, I can see it didn't really matter that much after all! The benefit of hindsight and perspective!

I give myself a hard time with failure (e.g. Zadie in pram). I want perfection. I find it hard to just be happy that I tried and sometimes it works, sometimes not. As my father wisely said: childcare cannot be solved by equations, so stop trying.

Lots of change. Challenging. The support of Annika is lovely. Although sometimes feel guilty for needed it - how strange as she's my wife, friend and mother of my child. Probably a general theme about my not asking for help enough?

Nappy changes. For some reason I thought nappy changes would somehow be too challenging. They're not. A blessing! The vast majority of the time it's as simple as flicking a light-switch. In fact sometimes any part of baby-care can be easy peasy; but at other times those same things can feel insurmountable. Furthermore, on some days it can be difficult even to find time to get out of pyjamas, much less have a shower or eat properly.

It has too often felt lonely for me. I even put out a request for help on Facebook and it was lovely to get so many replies which made me feel less lonely. Though when I've later asked people one-to-one for spontaneous help most people's calendars are full - perhaps this is a peculiarity of modern busy scheduled life? Anyway, humans are mammals and surely babies should be brought up in a pack/tribe/community; it feels so unnatural to shut a parent indoors with babies/children for several years. Although luckily we've been out most days, often to the excellent city facilities like playgroup (singing, playing, eating, chatting with other SAHPs). But we have been fortune to have opportunities with neighbours, visits to other countries, cities, museums, galleries, shops, nature, baby cinema, swimming, baby massage, etc. It so easy getting around by bus and especially train - whilst travelling one can go to restaurant, toilet, play area, etc. To us using a car seems a more difficult option.

We have actually met lots of people and I've even kept my Finnish language skills brushed up. It is lovely to have a network of acquaintances. And it's easier to speak with random people in day-to-day life when I'm with Zadie. Although I'm often wishing to find people who I can connect much better/deeper with.

I've also enjoyed getting involved in community work with Zadie at my side. I've volunteered at Kalliolan setlementti by teaching (in Finnish) mathematics and Finnish to small groups.

There is so much advice out there on parenting. And people often seem so sure of it - I guess unsure people keep quiet. But when I ask people for the source/reference/evidence, there normally is not one. With my scientific training, my mind wants to know whether something really has any chance of working or not and whether it will have any lasting effect (?damage) on our baby. I find it a challenge to just 'trust' myself as a parent when in society we get trained/licences/support for so many things we do. But babies seem to be mostly a lighter and own-values-based approach. I could think in circles for hours on these things, so I won't.

We're happy that we've avoided TV. There were perhaps 2-3 taxi rides where she was very upset and we used some YouTube nursery rhymes to help her cope with the taxi ride. But that's about it.

I've been virtually 24/7 with Zadie for many months in a row. Strange. I have enjoyed a 'night off' sleeping away from home: a nice medicine/luxury to relax.

We've been ill a lot - about once a month. Flus, colds, tummy bugs. Yuck.

I'm grateful that Annika works normal (8am-4pm) workdays and does not work at home and very rarely travels for work. It's a great support for me, and of course it's great for Zadie--Annika relationship too. I've not found myself clock watching to count the hours until Annika comes home.

The new-born phase is now a distant dream - I can't quite remember it. I'm looking forward to when Zadie can talk with us and do cool things like baking.

The whole SAHP experience gives perspective in so many ways. One mundane thing is simply not worrying so much about stains on clothes, queues of laundry, dirty dishes, etc. There just isn't always time to sort out these things immediately any more. Even though I knew, or could have guessed, most of what I've written about being a SAHP - it's still an extra level of understanding to walk in the shoes of a SAHP. Certainly a training in empathy.

I love Zadie and Annika very much, and I surely now have more understanding/love/compassion for myself. I'm very happy to be Zadie's father and I hope we have a close relationship as she grows up. Bring on Life 2.0.

Thursday, 11 May 2017

Baby's sleep statistics

Here are a few graphs, made in octave, of the development of our baby's sleep in recent months.
(see my earlier post for details about _how_ the data were collected)

  1. Falling to sleep typically varies around 0-60 minutes.
    Here, we are not including the bed-time routine of food, bath, soft music, turn lights down, pyjamas, etc. So here is an estimate of the time from first trying to put the baby down in the cot until asleep (i.e. no major movements). 
  2. Bedtime varies between 7 and 10pm, but clearly depends a lot when us parents chose to try to put the baby to sleep (hence there being many nights just after 8pm).
  3. Wake-up time varies between 5 and 8am.
    Again, is the baby wakes before 5am, we try hard to put her back to sleep - hence nothing before 5am.
  4. Sleep duration varies between 8 and 12 hours per night.
  5. The number of wakes per night varies between about 0 and 8.
    Yes, the baby sometimes sleeps _all night_ without waking.





Friday, 21 April 2017

UK general elections - progressive alliance?


Another UK general election is coming. Again in the media a so-called progressive alliance is being talked about (e.g. Guardian). The background is that in the UK in general the conservative-right has normally held together in one party, whilst the liberal-left has been fragmented. And in a winner-takes-all voting system, the liberal-left has been badly hit over the years - but I want to know HOW badly.

Normally in the past it has simply been a case of Labour + Liberal (Democrats). Although these days one could probably add in other parties to the mix, like Green and maybe say SNP, Plaid Cyrmu, etc.


So, in 18/19 general elections, progressive parties received the largest vote share -- although there was a Conservative government in 9/19 cases and a Conservative-led government in 1 case. So this confirms in numbers that the voting system favours the Conservatives.

It is rare for the progressive parties to even go below 50% - e.g. it happened in 2015 presumably because (a) the LibDems were punished for going into a coalition with the Conservatives and (b) UKIP's vote-share rose lots (and it seems that UKIP has a mix of right-left-conservative voters).

EDIT: Andy requested the seat info too, so here it is:



Wednesday, 1 March 2017

Sleep tracker for baby

Aim: Track baby's sleep using images from baby monitor.

Camera: D-Link DCS-825L
   Example image 17.5 kb, 640x352 pixels, 96x96dpi, 24bit.




Method, use the change in image filesize as a proxy for baby movement:
  • Capture image using wget from local network 192.168.1.2/image/jpeg.cgi
  • Crop the image using mogrify (imagemagick) to remove date and time from image.
  • An artefact of the above makes night-vision jpeg images in greyscale (and keeps lighted images in colour); we'll see later that this is useful metadata.
  • Repeat as often as possible (e.g. every second); although maybe it is possible to overload the camera.
  • Write to file with columns: Year, Month, Day, Hour, Minute, Seconds, FileSize, Greyscale

Analysis
  • The jpeg filesize varies from 0 to about 130 bytes from second to second, even with no movement.
  • Baby movements gives up to 400 bytes of variation.
  • Adult movement gives many hundreds or thousands of bytes of filesize changes.
  • We can cut off the awake-time evening and morning data when the night-vision was off (this is presumably when an adult was in the room putting the baby to sleep and collecting the baby in the morning).
  • Each morning plot (using octave) the night's movements:
    • Sleep was from 9pm until 7am, with help from parents around 04:30 to 05:00 (plus baby's own movements around 10pm, midnight, 2am, 4am):




Useful link:
  • D-Link forum: http://forums.dlink.com/index.php?board=427.0

Monday, 16 January 2017

Automated capture of radio communications

PART 2
(see also earlier blog post about this)

Aim: to log lake temperature

Method: similar to before, but with new device.

Device:
 * "SODIAL(R) New Wireless Digital Floating Swimming Pool Thermometer Bath Spa Temperature" bought from Amazon
 * Example result for 13.0degC was 01011000 01111010 00010010 10011111 10101111 00110011 1

Other notes on message:
 - there's a 'calibration' set of 8 before the main message
 - Then a long time at "1"
 - Then a long time at zero
 - Then main message
 - The start of each bit jumps from 0 to 1
 - After each bit there is a jump from 1 to 0
 - The 0 "on" is longer than the 1 "on"
 - The bits seem to be of different widths for "1" and "0"


Decoding:
  * Calibrated from 4 temperatures between 3 and 31degC. A linear relationship found between temperature and bits 15-24 (T = mx + c, where T is temperature (degC), m=0.1, c=-40, and x is the message in bits 15-24).

In Linux or Windows (or even Raspberry Pi):
    rtl_sdr -s 1e6 -n 3.2e7 -f 433.85e6 -g 40 output.dat
This should create a 32-second data sample at 433.85 MHz with a gain of 40dB and save the file to "output.dat".


In Octave:
  fid = fopen('output.dat','rb'); 
  y = fread(fid,'uint8=>double'); 
  y = y-127.5; 
  y = y(1:2:end) + i*y(2:2:end); 
  plot(abs(y));

Then many lines of Octave code to interpret and clean signal,
and then writes result to data log file with each row as follows: Year,Month,Day,Hour,Minute,Temperature(degC)



Helpful websites included:
  • http://electronics.stackexchange.com/questions/145714/what-encoding-is-used-in-this-signal
  • http://sdr.osmocom.org/trac/wiki/rtl-sdr
  • http://aaronscher.com/wireless_com_SDR/RTL_SDR_AM_spectrum_demod.html 

Wednesday, 4 January 2017

Moisture indoors

In Finland in winter, the indoor air is normally so dry that it causes problems with cracking/itchy skin. Ideal indoor moisture should be 30-50% relative humidity (NB. too high RH causes damp/mould), but easily indoor RH can get down to 10% in cold spells in Finland.

I have bought a sonic humidifier that has a 1 litre capacity and takes about a day to emit this moisture into the air. I want to know roughly how much effect this might have.

I'm going to ignore effects of sources/sinks/storage like showers/cooking/washing/ventilation.

If we imagine a starting point of 20C and 25% RH, then this is about 4 g/m^3.


Now let's imagine instantaneously and evenly adding all that 1 litre (1000 g) of water into the air in my flat (72 m^2 and about 3m tall, so volume of about 216m^3). This would be adding 1000/216 = 4.6 g/m^3.

So we would be roughly doubling the moisture content, and the RH would increase to about 50%. This would be a great result.

Future blog update...estimate the effect of time on this scenario by looking at the rate at which the humidifier works and the rate of ventilation in/out of the flat...