Friday 12 February 2016

Julia import, post-process and display of solar output. *swoon*

using DataFrames
n0 = readdlm("/home/starnesm/pi/solar/28-0215649a5cff.log");
n1 = readdlm("/home/starnesm/pi/solar/28-0215649a7aff.log");
# Would prefer to overload num2date but not sure how to.
num2date(l) = DateTime(l[1], l[2], l[3], l[4], l[5], l[6]) # Expects on line.
num2dateL(ls) = [num2date(ls[i, 1:6]) for i in (1:size(ls)[1])] # Expects lines.
using Gadfly
r3 = DataFrame(When = num2dateL(n0), T = n0[:, 8], group = "bot")
r3 = vcat(r3, DataFrame(When = num2dateL(n1), T = n1[:, 8], group = "top"))
plot(r3, x=:When, y=:T, color=:group, Geom.line, Guide.xticks(ticks=))
version 2: Python import pandas rt = "c:\\projects\\ipython\\" # cute. Windows is so messy. with file("temps.txt", "r") as a: b = a.readlines() c = [d.split(" ") for d in b] d = [[i[0], i[2], float(i[4])] for i in c] e = pandas.DataFrame(d, columns=['Thermos', 'datetime', 'temps']) [e[e.Thermos == i].temps.plot() for i in set(e.Thermos)]

Wednesday 3 February 2016

tw16 7dx

plumbing

jtmplumbing.co.uk for 22 mm john guest service valves.

pi

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/software