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

19th
Feb 2015
Dana Lewis
@danamlewis
Feb 19 2015 00:02
Would love to see it
Matthias Granberry
@mgranberry
Feb 19 2015 00:03
I'll put it up on GH once I have a chance to make it a little more convenient to work with. You have to paste all the data into a scala worksheet to do anything at the moment.
Dana Lewis
@danamlewis
Feb 19 2015 00:11
K
Chris Oattes
@cjo20
Feb 19 2015 00:13
so does it work out GI of the food from BG curves?
Matthias Granberry
@mgranberry
Feb 19 2015 00:18
pretty much. It uses carbs/fat/fiber/protein for what I have data on for training and clusters the curves and carb estimates into groups, treating the fat/fiber/protein/GI numbers with a Hidden Markov Model when they are unavailable, then classifies based upon these numbers
it's conceptually fairly similar to how speech recognition works at the lower levels.
Matthias Granberry
@mgranberry
Feb 19 2015 00:25
unfortunately an HMM doesn't quite fit this problem, so I will have to look for something better. It was just the easiest thing I could do with the data and tools I had.
Matthias Granberry
@mgranberry
Feb 19 2015 00:35
I think a factor analysis approach will lead to interesting results, including information on incorrect ratios or carb counts. It just takes more work to get there.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 04:19
That's very interesting @mgranberry . I am using a Bayesian approach too with Markov chain Monte Carlo for solving for the parameters in MATLAB for the artificial pancreas.
Matthias Granberry
@mgranberry
Feb 19 2015 04:23
I wondered if a simulated annealing approach would work for that
diabeticgonewild
@diabeticgonewild
Feb 19 2015 04:26
It may work nicely from a coding approach. I don't know about how practical it is as probability and statistics are not an area that I have really gotten into. I only implement the math from published papers
I am trained to deal with data structures
Matthias Granberry
@mgranberry
Feb 19 2015 04:34
I have avoided the Dalla Man models mainly because the thought of fitting a dozen or so parameters to my data didn't sound appealing, although most of those are continuous and differentiable, so lots of methods are available for doing so. It's just tricky because most of my math in the last 10 years has been machine learning on large sparse feature vectors, not dense noisy time series data on a small handful of features. The analysis techniques for each are very different.
Exercise near meals and fats are my biggest control problems right now and almost nothing seems to be in models around either of those topics.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 12:46
Wow! Impressive!
diabeticgonewild
@diabeticgonewild
Feb 19 2015 13:10
So Lane has been implementing a system for 4-5 years now
Anyways, I have a GI appointment this morning.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 14:04
Very impressive. I guess they have a lot of experience in human centered design, which is cool.
Dana Lewis
@danamlewis
Feb 19 2015 20:01
I know that's Lane's new venture, but not sure if he's been using the Bigfoot one - I think that was just Bryan (for his son and wife?) but I wouldn't be surprised if Lane's son is using it now :)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 20:03
Yeah, I don't read! LOL! I read most of the article, which is fascinating. I bet Lane's son is using it now, too. Lane is a really talented guy.
Dana Lewis
@danamlewis
Feb 19 2015 20:05
Lots of alignment with OpenAPS goals, which is so awesome to see so many of us swimming in the same direction from so many perspectives!
diabeticgonewild
@diabeticgonewild
Feb 19 2015 20:05
I know they will be successful, not only because it is the "right thing to do" but like with all of the restrictions in healthcare (test strips, insulin, pumps, CGMs) there will be several roadblocks to coverage. Certain insulins (primarily Humalog) are modeled only for the AP project and error for each meter has to be included in the models so you end up being "locked in". This is really the only practical way to getting coverage/reimbursement.
You will be successful too, @danamlewis and @scottleibrand
Matthias Granberry
@mgranberry
Feb 19 2015 20:14
Ugh. 54 and dropping after lunch (after drinking a rescue drink). I really need to figure out how to bolus for walking a mile uphill on the way back from lunch.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 20:19
That sucks man. I feel good right now. Got prescribed some medicine that's making me feel content and comfortable from my GI doctor. I'm going to enjoy the weekend.
Matthias Granberry
@mgranberry
Feb 19 2015 20:21
It's great to hear that something's going right for you.
Dana Lewis
@danamlewis
Feb 19 2015 20:24
+1
Scott Leibrand
@scottleibrand
Feb 19 2015 20:53
Nice.
Dominik Stefan
@DominikStefan
Feb 19 2015 22:40
That's pretty cool! I administered a 0.68U/H Temp Basal rate to my test pump.
didn't know that was possible
Dana Lewis
@danamlewis
Feb 19 2015 22:41
:)
Dominik Stefan
@DominikStefan
Feb 19 2015 22:44
:smile:
thought basal only did increments of .05
the power of open source! :smile:
I set the rate to .7U/H
any reason it's administering .68U/H instead of the full .7?
Toby Canning
@TC2013
Feb 19 2015 22:50
I have a book that explains Medtronic's basal rates, and Monica posted a link that gives the basic idea too, but neither of those explain the .68 exactly.
When the amount per hour is big enough, it divides the u/hr in 20 deliveries (once every 3 min).
Ben West
@bewest
Feb 19 2015 22:52
@DominikStefan you did .68 using my tool or how?
Dominik Stefan
@DominikStefan
Feb 19 2015 22:53
the funny thing is when I set a temp basal to .7U/H on the pump, then it stays at .7, but when I send a command from the Pi it ends up delivering only .68U/H
Dana Lewis
@danamlewis
Feb 19 2015 22:53
Oh interesting
diabeticgonewild
@diabeticgonewild
Feb 19 2015 22:53
I'm just curious, what book is it @TC2013 ?
Toby Canning
@TC2013
Feb 19 2015 22:53
Hey Ben, the lady selling the pumps sold the 722, but I did get the 522 ordered from her. I'll let you know when it arrives
@diabeticgonewild Let me go look and see if I can find it! I have a considerable stack and I don't remember off hand.
Dana Lewis
@danamlewis
Feb 19 2015 22:56
@TC2013 just curious, how much was it going for? (PM if you want?)
Toby Canning
@TC2013
Feb 19 2015 22:57
$250
Dana Lewis
@danamlewis
Feb 19 2015 22:57
Interesting, thanks,
Toby Canning
@TC2013
Feb 19 2015 22:58
I had to "wire" her the money because she wouldn't take paypal, so let's hope everything works out okay!
Dana Lewis
@danamlewis
Feb 19 2015 22:58
Heh, fingers crossed!
Toby Canning
@TC2013
Feb 19 2015 22:59
I spoke with her for a bit, and she is definitely diabetic, so even if it doesn't work out, we're still family ;)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:00
Here is the link if anyone was interested on the basics (there is always a better source somewhere...) of 522/722 basal rate delivery frequency and amounts http://forums.childrenwithdiabetes.com/showthread.php?25639-When-is-basal-delivered&highlight=minimed%20basal%20program
Toby Canning
@TC2013
Feb 19 2015 23:04
Now I need to get another carelink stick though
I broke ours the other day ;(
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:04
I bought one, and it had a manufacturing date of 09/2014, so they are still manufacturing them
Dang, that sucks!
Dana Lewis
@danamlewis
Feb 19 2015 23:05
I broke one recently, too - bent it. Luckily had a second one, but just got another (the new 2nd one) from Ebay
Toby Canning
@TC2013
Feb 19 2015 23:05
How much?
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:05
I wish we could 3D print a case for all of the hardware easily. Actually Lynda.com (a paid subscription service--all inclusive) has a tutorial on how to get started with 3D printing
*everything except the pump, I mean
Dana Lewis
@danamlewis
Feb 19 2015 23:06
Trying to remember what @scottleibrand said it ended up being, maybe $40? I know the first one we bought for 60-75, the second one we got for like $35.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:07
Lynda.com is really useful for digital creative industries, learning programming, and other creative skills. The 3D printing courses are here:
http://www.lynda.com/D-Printing-training-tutorials/6343-0.html
I used to be a member, but not anymore :(
Dana Lewis
@danamlewis
Feb 19 2015 23:07
Giggle every time I think about it, I thought Scott was crazy a year ago for insisting on buying one (before we had any idea what we could end up doing with it :)). "Why do you want it, it only uploads my data to the computer when you sit next to it and you can't do anything with the data!". Ahhhh, I love when I regret things I earlier said re: diabetes tech :)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:08
Yeah, when I programmed that stuff in MATLAB in 2011, I thought it could make a groundbreaking difference, but I would have had to lug a netbook around with me 24/7
Toby Canning
@TC2013
Feb 19 2015 23:08
That's awesome!
Dana Lewis
@danamlewis
Feb 19 2015 23:10
Reaaaaaallly wanting the android uploader, though, so I can use more on the go and start testing during exercise (the one scenario I haven't looped during).
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:11
Yeah, I bet. I do know Java but I have never programmed an Android app before. But, I also don't want to get distracted from my work. I think the Android solution would be awesome!
Actually, Stanford put out a patent app for an AP controller using physical activity monitors. (Remember that my EE cousin is designing them as medical devices using special materials)
Dana Lewis
@danamlewis
Feb 19 2015 23:12
Same here, and @ktind is a saint for not hitting me every time I talk about it, since he's the mastermind working on it :)
Toby Canning
@TC2013
Feb 19 2015 23:12
@danamlewis Is there going to be a call soon with the openaps group?
Dana Lewis
@danamlewis
Feb 19 2015 23:12
Hm, are they using heart rate monitor/others as part of it?
@TC2013 want one? :) didn't seem to be a lot of interest in a call after the first email
Toby Canning
@TC2013
Feb 19 2015 23:13
Yes, we are just about ready to begin experiments with our closed loop and I'd love to get others actively rolling
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:13
IDK on the patent apps, but there are other components too. Like accelerometers. Like the devices that they have been using for physical activity (in only a few AP studies) are $3000 medical devices that require prescriptions.
I got a guy on Twitter interested, a CivE
I am trying to find the patent app (I know some of you don't want to look at patents though)
Dominik Stefan
@DominikStefan
Feb 19 2015 23:14
@bewest It was with your tool, but I'm new to all this so it could very, very easily be user error on my part. At one point in the terminal it said "'rate': 0.675". Not sure what that means, but it seems to have rounded the .675 to .68.
Dana Lewis
@danamlewis
Feb 19 2015 23:14
@TC2013 fantastic!! K.
@diabeticgonewild interesting. I know how I could use my phone's accelerometer to incorporate into predictions and triggering various modes, will be curious to see what they do with it
Yea, I don't want to read it. I'm just curious generally :) and it's on my long term integration wish list
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:15
Hovorka recently modeled physical activity too, like this past year.
I can send you the article by Hovorka
I will find it. Give me 15 minutes.
Dana Lewis
@danamlewis
Feb 19 2015 23:16
No rush. I'm at work and about to head back into a pile of to-dos before the end of the work day :)
Thanks!
Ben West
@bewest
Feb 19 2015 23:18
@DominikStefan yeah, could well be rounding thing
sounds like it should be 0.675 perhaps, what were the arguments you gave the tool?
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:19
Yeah, but I will get it done now so it won't pile up for me! The HR component is also used to aid in detection of hypoglycemia based on heart rate variability, too.
Yeah published this January Quantifying the Acute Changes in Glucose with Exercise in Type 1 Diabetes: A Systematic Review and Meta-Analysis.
Key Points:
  • Novel glycemiarate-of-changemagnitudedata
    expressed in measurable units may provide a means of
    translating the effects of exercise on glucose dynamics
    into information that benefits patient self-management.
  • Rapid decays of glycemia were found during
    continuous moderate exercise, followed by mild
    increases immediately afterwards.
  • Resistance exercise was associated with more
    constrained decreases, whereas discrepancies were
    found for intermittent high-intensity exercise.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:24
Actually, the math involved, is super, super simple. 6 equations, and 2 with derivatives (rates of change)
I don't know how to upload the paper straight to this page though. Does anyone know how to do that?
Dominik Stefan
@DominikStefan
Feb 19 2015 23:27
@danamlewis Just bought a carelink too, but as a backup! Off ebay as well. Should be here any day now.
Toby Canning
@TC2013
Feb 19 2015 23:29
@danamlewis I'm going to post a request for people to meet on the phone this Saturday at 4pm PT. Would you and Scott be able to attend?
Dana Lewis
@danamlewis
Feb 19 2015 23:30
Sure. Have a line or want me to suggest mine? (Free conference call, but it works)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:30
@TC2013 ,I would recommend Google Hangouts on Air. It records the sessions automatically to YouTube, and you can customize who can/can't see it.
But it's just preference
Ben West
@bewest
Feb 19 2015 23:31
:+1:
Dana Lewis
@danamlewis
Feb 19 2015 23:32
@TC2013 thanks for jumping on that :)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:32
+1
Chris Oattes
@cjo20
Feb 19 2015 23:33
@TC2013 what si the phone meeting for?
Toby Canning
@TC2013
Feb 19 2015 23:33
Scott and Dana's OpenAPS collaboration

Hi All,

If you are interested, please join me this Saturday at 6:00pm Central Time to discuss collaboration. Please call 857-232-0157 ext 685602 I will record the call for those who can't attend and I can be flexible with the time. If Dana or Scott can attend, I would like one of them to lead the call. If not, I'm happy to do so.

I would like to divide up work so that we can piece things together. I am going to start with the same hardware setup Dana and Scott are using, but the concepts for other systems should be similar and we will all benefit from working together. Let's establish an order of importance for getting things to work and people can self-select what they want to work on. We can also discuss how best to share the work in a responsible way that fits with Dana and Scott's vision for this group.

Hope to talk to you soon,
Toby

diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:34
wow, nice
Chris Oattes
@cjo20
Feb 19 2015 23:35
that number looks expensive to listen to :P
Toby Canning
@TC2013
Feb 19 2015 23:36
It is a free conference calling line. Is there a better option for our over seas friends?
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:36
Yeah, also, the setup is kind of complicated, but you can do Google Hangouts on Air, pure audio via Android or iPhone app
I used it in school and stuff for team projects at ASU. Let me find like a YouTube video on making a phone conference via the Android/iPhone app for Google Hangouts on Air
Chris Oattes
@cjo20
Feb 19 2015 23:37
TC2013: If I did dial in it would probably only be because I'm interested in listening, I'm not sure I have enough time to contribute a meaningful amount
Toby Canning
@TC2013
Feb 19 2015 23:37
I can record the call and share it as an audio file
Chris Oattes
@cjo20
Feb 19 2015 23:37
i.e. don't go looking for free alternatives just for me
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:38
Hangouts on Air does it automatically. Also, you can just "listen in" via Hangouts on Air. It is much more versatile
*records automatically
Toby Canning
@TC2013
Feb 19 2015 23:39
@diabeticgonewild Do people have to do anything to use Hangouts? Other than click on a link?
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:39
Google+
Toby Canning
@TC2013
Feb 19 2015 23:40
I'll stick with the line for this call, but we can discuss it on the call.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:40
They have to join Google+, and there is some setup involved. I have a worksheet guide for doing it.
Got it.
Dana Lewis
@danamlewis
Feb 19 2015 23:40
There's a limit of 10 people, though. Ya, let's start with the call and discuss and see if there's any limitations/benefits of switching.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:41
No people limit for Hangouts on Air
Matthias Granberry
@mgranberry
Feb 19 2015 23:43
@danamlewis Jawbone's APIs provide a whole lot of useful data for exercise analysis and it doesn't require you to do raw accelerometer analysis. Google Fit is a pain, but the google activity recognition (driving, walking, running, cycling, sitting) might be useful. I just haven't it high enough on my list of priorities to try to pull any correlations out of it.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:44
It does have a complicated setup, and it does require some prior practice. But I have done it before. @TC2013 , I am going to send you the ultimate "setup guide" for a full (video, screensharing, etc.) broadcast. Obviously, people just can listen in or use mic/speaker only if they want, even via their phone via the Google Hangouts app for Android or iPhone
Dominik Stefan
@DominikStefan
Feb 19 2015 23:45
@bewest I used ./bin/mm-temp-basals.py
python ./bin/mm-temp-basals.py --port /dev/ttyUSB0 --serial 509067 set --duration 60 --rate 0.7 --init
Dana Lewis
@danamlewis
Feb 19 2015 23:45
@mgranberry Yea. I also toyed with exporting runkeeper/breeze data and/or Fitbit data from my accelerometer to start running some scenarios on when to fire an alert recommending activity mode, but didn't move far with it yet. I have a ton of correlations I know of and good scenarios, just no motivation to build them right now. Trying to balance optimal features to add with out making the backend unnecessarily complicated.
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:45
You can share it with @danamlewis and @scottleibrand if you want, but I definitely can set it up. I used to work in Geek Squad and I have done lots and lots of things with Google Apps for school
sent
That is geared at actual "broadcasted shows" though
Matthias Granberry
@mgranberry
Feb 19 2015 23:49
@danamlewis right. That's why it's low on my list of priorities. I usually just crank the basal down in anticipation and things come out alright. I'd just like an alert if I muck it up or some assistance recovering if I don't get to exercise as planned. I need to get the T:Slim uploader for Tidepool finished up so I can continue to reverse engineer the pump without legal encumberance.
Dominik Stefan
@DominikStefan
Feb 19 2015 23:49
@bewest *pi@raspberrypi ~/decoding-carelink $ ./bin/mm-temp-basals.py
python ./bin/mm-temp-basals.py --port /dev/ttyUSB0 --serial 509067 set --duration 60 --rate 0.7 --init
Dana Lewis
@danamlewis
Feb 19 2015 23:50
@mgranberry yea. If I didn't have #DIYPS manual mode (which is what does my saves post-exercise even if I'm not plugged in during), I'd have prioritized that a lot higher. And sounds good re: getting t:slim rolling :)
diabeticgonewild
@diabeticgonewild
Feb 19 2015 23:54
@mgranberry , are you programming an OS, with bluetooth drivers, to get the bluetooth chip to work? I have a backup t:slim and I don't know assembly language yet. Also, I know the prototyping board to be used, which interfaces with a motor and LCD, and even a bluetooth chip if you add it on.
There's ink printed on the chip of the internals on FCC.gov , and that's the specific Cortex ARM M3 microprocessor used. Prototyping board costs ~$140-150
Matthias Granberry
@mgranberry
Feb 19 2015 23:58
I have a couple of these http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419 sitting in a box. I'm not keen on doing a firmware rewrite because there's just too much work to do there when I could just buy a MMT pump and run with it. I'll try and socialize it with the Tandem folks if I get to the point where I want to issue remote commands. They have the ability to because they used the BLE interface with an iPhone in the dual-hormone APS trials.