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

Use full ICE history for displaying estimated carbohydrate effects #2163

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

oliverstory
Copy link

The 'predicted' dataset on the 'glucose change' graph was calculated using insulin counteraction effects that had been truncated to the width of the chart. This meant that carb entries early in the timeline may not have dynamic carb absorption applied as the implied ICE was zero for the first part of the carb entry's history.

Addresses the different behaviour in landscape and portrait view of the glucose change graph in the carbohydrate screen. so that dynamic carb effects are always shown when they are in effect.

For discussion (but not included in this pull request), for clarity the graph dataset label could be changed from 'Predicted' to 'Estimated and predicted' given that it already incorporates dynamic glucose effects (when these are in effect), so is partly based on observation.

Does not address what I described as 'desired' behaviour of showing a static prediction for the 'predicted' dataset; I am not sure how you would achieve that.

Closes #2159

The 'predicted' dataset on the 'glucose change' graph was calculated using insulin counteraction effects that had been truncated to the width of the chart. This meant that carb entries early in the timeline may not have dynamic carb absorption applied as the implied ICE was zero for the first part of the carb entry's history.
@marionbarker
Copy link
Contributor

I cannot reproduce the issue reported in #2159 with my test phone.
I can apply the patch to dev, commit 47450c1.
It applies cleanly, builds with no problem and the ICE screens are unchanged.

If there's an additional test that would be helpful, I could try again.
(I ran for about 6 hours with 3 carb entries.)
Do you know of specific configuration I could try to reproduce to make the inconsistency show up?

@oliverstory
Copy link
Author

oliverstory commented May 18, 2024

Based on my understanding of the maths, to reproduce the issue prior to the patch you need:

  1. A carb entry where ICE is slightly larger than minimum rate absorption but not hugely larger.
  2. To set this up on a test phone you could try adding an insulin entry and have glucose flat. Add a matching carb entry at a similar time. Make the carb entry slightly smaller than you'd normally have for that amount of insulin (or conversely, make the insulin entry slightly larger than your settings would recommend for that carb amount). You could enter this at a time close to the earliest time on the portrait view glucose change graph to make subsequent steps shorter.
  3. Carb entry should initially show dynamic carb absorption - ie ‘predicted’ curve will follow ‘observed’ curve - on both graphs.
  4. Wait until the start time of the carb entry moves off the left of the portrait view graph. At a certain point, the sum of minimum rate absorption over time for the entry will be more than the sum of ICE (because prior to the patch, ICE is truncated at the left edge of the graph). Now the predicted curve will follow minimum rate absorption and be below ICE on the portrait view. But on landscape view, the it should still show dynamic carb absorption (because the landscape view uses a longer series of ICE values).

@Trpl7ca
Copy link

Trpl7ca commented Jul 11, 2024

I would like to try this, if I use your commt number and git hub info and add line to my yum file, would that work for browser build?

@oliverstory
Copy link
Author

oliverstory commented Jul 11, 2024 via email

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

Successfully merging this pull request may close these issues.

Glucose change graph 'predicted' effects are inconsistent at different times or between orientations
3 participants