MarkMpn / AutotuneWeb

A web interface for running Autotune
45 stars 31 forks source link

ISF conversion issue ? #5

Closed chbra closed 5 years ago

chbra commented 5 years ago

Thanks for this wonderful tool.

Getting some weird ISF recommendations. For every iteration it wants to increase it. I suspect this is related to mmol/L - mg/dL conversion.

Our current ISF is 9 mmol/L.

From the profile generated by autotuneweb: "sensitivities": [ { "i": 0, "start": "00:00:00", "sensitivity": 162.0,

From the log file after running: Limiting adjusted ISF of 159.28 to 12.86 (which is pump ISF of 9 / 0.7 ) p50deviation: -1.775 p50BGI -0.14 p50ratios: 12.649 Old ISF: 12.592 fullNewISF: 159.276 adjustedISF: 12.857 newISF: 12.645 newDIA: 6 newPeak: 75

Resulting in this recommendation: Parameter | Pump | Autotune | Days Missing

ISF [mg/dL/U] | 9.000 | 12.645 |

MarkMpn commented 5 years ago

You're correct that this is down to the mmol/L - mg/dL conversion. This hasn't worked in your case because your Nightscout profile does not include the units specification in the same way as all other examples I've seen, and doesn't seem to follow the (rather loose) specification on the Nightscout site.

There's a couple of problems with how this profile looks (you can see the data the website is using by going to /api/v1/profile/current within your Nightscout site):

  1. This data contains 1 or more profiles within the store object. The units setting should be within that, but in your case it is outside
  2. The units should be either mgdl or mmol. In your case it is mmol/L

I'm not sure how this profile has been generated, but it might be worth trying editing and saving a new copy in the Nightscout profile editor and see if that sorts out these issues.

chbra commented 5 years ago

Thank you. That seems to be the cause, yes. Once I tried generating a new profile it ran without issues.

The profile was generated by our Loop app which has an add-on for updating nightscout profiles.