Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using the IOB curves from oref0/openaps #90

Closed
trixing opened this issue Nov 27, 2016 · 3 comments
Closed

Consider using the IOB curves from oref0/openaps #90

trixing opened this issue Nov 27, 2016 · 3 comments

Comments

@trixing
Copy link

trixing commented Nov 27, 2016

LoopKit uses a static model for only 4 supported DIAs.

I'd propose replacing the algorithm with the curve found in oref0/openaps:

https://github.com/nightscout/cgm-remote-monitor/blob/master/lib/plugins/iob.js
https://github.com/openaps/oref0/blob/master/lib/iob/calculate.js

This gives a much smoother curve at the end of the action duration.

iob_curves

Especially visible in the derivatives of the functions

iob_diff

oskarpearson pushed a commit to oskarpearson/LoopKit that referenced this issue Dec 7, 2016
@ps2
Copy link
Collaborator

ps2 commented Jul 3, 2017

The discontinuity in the end of the graph does not have much effect on treatment decisions. However, we are looking at the timing of the peak, based on graphed plots of insulin counteraction effects in LoopKit/Loop#507.

@scottleibrand I seem to remember you mentioning that OpenAPS has a peak at around 75 minutes., but the graph above shoes a peak at 100 minutes. Is the graph above wrong, or perhaps it was for a different DIA?

@scottleibrand
Copy link

The 75 minute peak is with a DIA of 3 hours. With 4 hours it's stretched to 100 minutes.

@ps2
Copy link
Collaborator

ps2 commented Aug 20, 2017

Not going to use the curves from OpenAPS. Work on using separate exponential curve model here: LoopKit/Loop#539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants