Coder Social home page Coder Social logo

asl5000_utils's Introduction

PyPI version

asl5000-utils

A bunch of functions to extract data from the ASL 5000.

What's the ASL?

The ASL 5000™ is a breathing simulator capable of simulating a wide range of patients, produced by IngMar Medical©. It is mainly used for educational purpose, developing products and testing ventilators. Check the IngMar Medical website for more information.

Install

The ASL5000 utils can be installed using the pip package manager:

pip install asl5000-utils

Usage

Let's our environment be:

./
    data/
        simulation.rwb
        simulation.avb
        simulation.brb
    main.py

main.py

import asl5000_utils as asl
import matplotlib.pyplot as plt

labels, array = asl.read_rwb("./data/simulation.rwb")
print(labels)
# ['Time (sec)', 'Airway Pressure (cmH2O)', 'Muscle Pressure (cmH2O)', 'Tracheal Pressure (cmH2O)', 'Chamber 1 Volume (L)', 'Chamber 2 Volume (L)', 'Total Volume (L)', 'Chamber 1 Pressure (cmH2O)', 'Chamber 2 Pressure (cmH2O)', 'Breath File Number (#)', 'Aux 1 (V)', 'Aux 2 (V)', 'Oxygen Sensor (V)']
time = array[0]
time_label = labels[0]
curves = [1, 6, 2]  # Paw, Volume, Pmus

fig, ax = plt.subplots(len(curves), 1, sharex=True)
plt.title("Example: visualizing the rwb data using matplotlib")
for i, index in enumerate(curves):
    ax[i].plot(time, array[index])
    ax[i].set_ylabel(labels[index])
ax[-1].set_xlabel(time_label)

for a in ax:
    a.grid(linestyle="dotted")
plt.show()

Graph_RWB

In the same way, you can use asl.read_avb or asl.read_brb to read data/simulation.avb or data/simulation.brb.

asl5000_utils's People

Contributors

deplanty avatar

Stargazers

 avatar

Watchers

 avatar

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.