Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JMathiszig-Lee committed May 22, 2019
1 parent f21338b commit 5676bde
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions PyTCI/models/propofol.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def effect_bolus(self, target: float):
mgpersec = bolus / bolus_seconds

self.tenseconds(mgpersec)
self.wait_time(ttpe-10)
self.wait_time(ttpe - 10)

effect_error = ((self.xeo - target) / target) * 100
step = effect_error / -1
Expand All @@ -32,7 +32,7 @@ def effect_bolus(self, target: float):

bolus_needed = mgpersec * 10

return round(bolus_needed,2)
return round(bolus_needed, 2)

def reset_concs(self, old_conc):
""" resets concentrations using python dictionary"""
Expand Down Expand Up @@ -62,8 +62,6 @@ def plasma_infusion(self, target: float, time: int):
sections = round(time / 10)
pump_instructions = []



for _ in range(sections):

first_cp = self.tenseconds(3)
Expand All @@ -79,21 +77,20 @@ def plasma_infusion(self, target: float, time: int):

final_mgpersec = (target - offset) / gradient
if final_mgpersec < 0:
#do not allow for a negative drug dose
# do not allow for a negative drug dose
final_mgpersec = 0

section_cp = self.tenseconds(final_mgpersec)
old_conc = {
"ox1": self.x1,
"ox2": self.x2,
"ox3": self.x3,
"oxeo": self.xeo,
"oxeo": self.xeo,
}


pump_instructions.append((final_mgpersec, section_cp))
return(pump_instructions)

return pump_instructions


class Schnider(Propofol):
Expand Down

0 comments on commit 5676bde

Please sign in to comment.