Code Monkey home page Code Monkey logo

diasim's Introduction

diabetic metabolic simulator

aka diasim. Runs a discrete timestep simulation of diabetic metabolism.

  • live modelling of insulin, exercise, and food metabolism.
    • exercise: can specify intensity and duration.
    • food: can specify carbs or protein, and glycemic index
    • insulin: models the nonlinear release curve of Fiasp.
  • downloads glucose feed from NightScout.
  • designed for use by insulin pump users
    • includes facilities to model basal/bolus parameters

Install.

$ npm i
$ npm run dev

# open http://localhost:3000

Usage.

diasim is in development. You will need to download your NightScout glucose data to a local file in data/glucose.json. This can be automated using a script.

NIGHTSCOUT_ENDPOINT_URL=https://<NIGHTSCOUT_SERVER>.herokuapp.com ./scripts/get-data.sh

Then you can start adding events and simulating different changes to your parameters. Here's a sample of events you can paste and use (implemented in src/pages/helpers.ts):

20/5/2020 begin

# TIME food AMOUNT (carbs/protein) GLYCEMIC_INDEX
14.00 food 20g carbs 80
15.00 food 20g protein
16.00 insulin 12.1

# Bolus/correct uses the specified pump ratios.
16.00 bolus 50g
16.00 correct 12.5

# TIME exercise DURATION INTENSITY
17.00 exercise 30mins .8

diasim's People

Contributors

liamzebedee avatar

Stargazers

 avatar

Watchers

 avatar  avatar

diasim's Issues

Insulin pump IOB calcs

11/06/2020 begin
10.33 correct 12.2
#12.01 correct 10.1
12.01 insulin 1.2

Insulin pump gives more than 1.2U for the correction of 10.1 mmol. This likely stems from the IOB calculation. Needs more understanding.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.