ROP Exam Analysis for NIRS and Pulse Ox

Finalized notebook to combine Masimo and NIRS Data into one iPython Notebook.

Select ROP Subject Number and Input Times


In [ ]:
from ROP import *
#Takes a little bit, wait a while.
#ROP Number syntax: ###
#Eye Drop syntax: HH MM HH MM HH MM
#Exam Syntax: HH MM HH MM

Baseline Average Calculation

From first point of data collection to the first eye drops


In [ ]:
print 'Baseline Averages\n', 'NIRS :\t', avg0NIRS, '\nPI :\t',avg0PI, '\nSpO2 :\t',avg0O2,'\nPR :\t',avg0PR,

First Eye Drop Avg Every 10 Sec For 5 Minutes


In [ ]:
print resultdrops1

Second Eye Drop Avg Every 10 Sec For 5 Minutes


In [ ]:
print resultdrops2

Third Eye Drop Avg Every 10 Sec For 5 Minutes


In [ ]:
print resultdrops3

Average Every 10 Sec During ROP Exam for first 4 minutes


In [ ]:
print result1

Average Every 5 Mins Hour 1-2 After ROP Exam


In [ ]:
print result2

Average Every 15 Mins Hour 2-3 After ROP Exam


In [ ]:
print result3

Average Every 30 Mins Hour 3-4 After ROP Exam


In [ ]:
print result4

Average Every Hour 4-24 Hours Post ROP Exam


In [ ]:
print result5

Mild, Moderate, and Severe Desaturation Events


In [ ]:
print "Desat Counts for X mins\n"
print "Pre Mild Desat (85-89) Count: %s\t" %above, "for %s min" %((a_len*2)/60.)
print "Pre Mod Desat (81-84) Count: %s\t" %middle, "for %s min" %((m_len*2)/60.)
print "Pre Sev Desat (=< 80) Count: %s\t" %below, "for %s min\n" %((b_len*2)/60.)

print "Post Mild Desat (85-89) Count: %s\t" %above2, "for %s min" %((a_len2*2)/60.)
print "Post Mod Desat (81-84) Count: %s\t" %middle2, "for %s min" %((m_len2*2)/60.)
print "Post Sev Desat (=< 80) Count: %s\t" %below2, "for %s min\n" %((b_len2*2)/60.)

print "Data Recording Time!"
print '*' * 10
print "Pre-Exam Data Recording Length\t", X - Y # start of exam - first data point
print "Post-Exam Data Recording Length\t", Q - Z #last data point - end of exam
print "Total Data Recording Length\t", Q - Y #last data point - first data point

In [ ]: