Skip to content

Consider using the IOB curves from oref0/openaps #90

Closed

Description

@trixing

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

Activity

  1. ps2 commented on Jul 3, 2017

    @ps2
    Collaborator

    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?

  2. scottleibrand commented on Jul 3, 2017

    @scottleibrand

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

  3. ps2 commented on Aug 20, 2017

    @ps2
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions