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

Loopalyzer enhanced #4215

Merged
merged 18 commits into from
Feb 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added timeshift explanation
Need to run through a last verification before merging to NS,
but my NS currently won't build b/c of npm issues.
  • Loading branch information
lixgbg committed Feb 2, 2019
commit be4f8a2aeb83d512871de6c57a7f5eada548c329
11 changes: 5 additions & 6 deletions lib/report_plugins/loopalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function init() {
module.exports = init;

var laDebug = false; // If we should print console.logs
var laVersion = '2019-02-02 v2';
var laVersion = '2019-02-02 v4';
var risingInterpolationGap = 6; // How large a gap in COB/IOB graph is allowed to be to be interpolated if end value is larger than start
var fallingInterpolationGap = 24; // And if less than start
var interpolationRatio = 1.25; // But do allow rising interpolation if gap larger than interpolationGap and end value is less than 10% larger than start
Expand All @@ -27,11 +27,10 @@ loopalyzer.html = function html(client) {
var translate = client.translate;
var ret = '';
ret += '<h2>Loopalyzer&nbsp;&nbsp;<span id="loopalyzer-dateinfo"></span></h2>';
ret += '<span id="loopalyzer-help">' + translate('The primary purpose of Loopalyzer is to visualise how the Loop' +
' closed loop system performs. It may work with other setups as well, both closed and open loop, and non loop. However depending on which uploader you use, how frequent it is able to capture your data and upload, and how it is able to backfill missing data some graphs may have gaps or even be completely empty. Always ensure the graphs look reasonable. Best is to view one day at a time and scroll through a number of days first to see.');
ret += '<br/><br/>' + translate('Loopalyzer includes a time shift feature. If you for example have breakfast at 07:00 one day and at 08:00 the other day your blood glucose curve averaged over these two days will most likely look flattened out and not show the actual response after a breakfast. Time shift will calculate the average time when these meals were eaten and then move all data (carbs, insulin, basal etc.) from both days so that they align to the average meal time.');
ret += translate('In this example all data from first day is pushed 30 minutes forward in time and all data from second day 30 minutes backward so it appears as if you had had breakfast at 07:30 both days. This allows you to see your actual average blood glucose response from a meal. Time shift highlights the period after the average meal time in gray, for the duration of the DIA (Duration of Insulin Action). As all data points the entire day are shifted to align to the start of the average meal time the curves outside the gray area may not be accurate.');
ret += '<br/>' + translate('Note that time shift is available only when viewing multiple days.');
ret += '<span id="loopalyzer-help">' + translate('V1 The primary purpose of Loopalyzer is to visualise how the Loop closed loop system performs. It may work with other setups as well, both closed and open loop, and non loop. However depending on which uploader you use, how frequent it is able to capture your data and upload, and how it is able to backfill missing data some graphs may have gaps or even be completely empty. Always ensure the graphs look reasonable. Best is to view one day at a time and scroll through a number of days first to see.');
ret += '<br/><br/>' + translate('Loopalyzer includes a time shift feature. If you for example have breakfast at 07:00 one day and at 08:00 the day after your blood glucose curve average over these two days will most likely look flattened out and not show the actual response after a breakfast. Time shift will compute the average time these meals were eaten and then shift all data (carbs, insulin, basal etc.) during both days so that they align to the average meal time. ');
ret += '<br/>' + translate('In this example all data from first day is pushed 30 minutes forward in time and all data from second day 30 minutes backward in time so it appears as if you had had breakfast at 07:30 both days. This allows you to see your actual average blood glucose response from a meal. Time shift highlights the period after the average meal time in gray, for the duration of the DIA (Duration of Insulin Action). As all data points the entire day are shifted to align to the start of the average meal time the curves outside the gray area may not be accurate.');
ret += '<br/></br>' + translate('Note that time shift is available only when viewing multiple days.');
ret += '<br/><br/><b>';
ret += translate('To see this report, press SHOW while in this view');
ret += '</b></span>';
Expand Down