These are chat archives for nightscout/intend-to-bolus

26th
May 2015
Ben West
@bewest
May 26 2015 00:44
sheesh
that byte...
    0000020: 0700 0000 e2a7 6654 5583 00d9 0000 0000  ......fTU.......
    0000020: 0700 0000 e2a7 6654 5583 00d9 0000 0000  ......fTU.......
    0000020: 4700 0000 e2a7 6654 5580 0100 0000 0000  G.....fTU.......
    0000020: 4700 0000 e2a7 6654 5580 011b 0000 0000  G.....fTU.......
    0000020: 4700 0000 e2a7 6654 559b 0400 0000 6000  G.....fTU.....`.
there are 5 places with the same e2 before the a7
but the bytes are all different in there...
32 pages of data, (0x80)
./totalphase_csv_hexdump.sh complete-pump-nextlink.csv | grep 'a7 66' | tr -s ' ' | cut -d' ' -f 5- | while read head line ; do echo $(python -c "print '{0:#010b}'.format(0x${head:0:2})") ${head:0:2} $head $line ; done | sort | uniq -c | sort -n | tee complete-pump-nextlink/byte-before-a7.txt
Ben West
@bewest
May 26 2015 01:22
frustrating
want to see traces of someone else's pump to see which bytes are affected by serial number
Matthias Granberry
@mgranberry
May 26 2015 02:05
how are you dumping data?
diabeticgonewild
@diabeticgonewild
May 26 2015 09:32
@mgranberry , the monotonic piecewise cubic hermite spline is going to be a PITA to program. I have like 48 data points, so 48 splines to program. However, RMSE is literally 0.
I have to essentially integrate this function to get IOB (I already subtracted and accounted for basal glucose infusion rate) but you get the point
MATLAB.jpg
PCHIP is just the function for the monotonic piecewise cubic hermite spline
or command/whatever
diabeticgonewild
@diabeticgonewild
May 26 2015 09:37
4thorderpolynomial.jpg
See 48 4th order polynomial equations to create, but it looks like the way to go...480 minutes over 10 minute intervals...
Matthias Granberry
@mgranberry
May 26 2015 12:03
If it's a big pain then simplify it. Exact doesn't make much practical sense. Just look for inflection points and for functions between them
Toby Canning
@TC2013
May 26 2015 12:26
@bewest Great work!
Holger Sanft
@holgi13
May 26 2015 13:34
Is it correct, when the 554 had an activ bolus with time of 60 minutes, they can't get temp basal commands from APS on same time?
diabeticgonewild
@diabeticgonewild
May 26 2015 15:00
True... @mgranberry but I don't want to change it :P . Supposed to be getting my infusion this morning but can't get there yet due to flooding still. Roads and highways even are still high.
I have the patience though...
Matthias Granberry
@mgranberry
May 26 2015 15:04
@diabeticgonewild Part of why you want to simplify it is that it's a pain to use a function that has been constructed as a 400-part spline.
you want to strike a balance between mathematically well-behaved and usable. Simple models usually work best unless there is a clear reason to do something more complex.
diabeticgonewild
@diabeticgonewild
May 26 2015 15:05
40 part but pretty much bad enough
If I can do it to like even 8 parts it would be fine
For sure... All you would need is like 3
Matthias Granberry
@mgranberry
May 26 2015 15:07
Manually pick points near the inflection points and adjust the tangents to give you the properties that you want and you're set. 3-4 points looks like enough.
diabeticgonewild
@diabeticgonewild
May 26 2015 15:07
Yeah I would agree
I'm about to leave for my infusion soon as water has receded some and you can drive through town though without extreme traffic ...they have found like 3 bodies do far due to the flooding in my area.
Matthias Granberry
@mgranberry
May 26 2015 15:44
Yep. We got hit fairly hard in Austin too. Luckily I live far enough away from any problem creeks that it didn't affect me much personally.
diabeticgonewild
@diabeticgonewild
May 26 2015 16:07
Yeah I have to drive across town to get to the hospital where my infusion is at. I do live in the city though but I can't avoid the flood areas... Like it was super flooded in some areas. Like the bayou which is pretty stagnant water looked like rivers in some areas and like it sounded like Mountain creeks cause it flowed so quickly. Crazy
But I might be doing infusions at home soon. It costs the insurance less money so it's a win win situation
diabeticgonewild
@diabeticgonewild
May 26 2015 16:13
And my gut hurts. FML