Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -838,15 +838,18 @@ def lvad_plots(Rm, Ra, Emax, Emin, Vd, Tc, start_v, beta, loop_simulated=True):
|
|
| 838 |
plt.xlim((0,250))
|
| 839 |
start = (N-2)*60000
|
| 840 |
end = (N)*60000
|
|
|
|
|
|
|
|
|
|
| 841 |
if loop_simulated:
|
| 842 |
#line1 = ax.plot(Vlv0[start:end], Plv0[start:end], lw=1, color='b',label='No LVAD')
|
| 843 |
#point1 = ax.scatter(Vlv0[start:end], Plv0[start:end], c="b", s=5)#, label='End Diastole')
|
| 844 |
line2 = ax.plot(Vlvs[start:(start+1)], Plvs[start:(start+1)], lw=1, color=(78/255, 192/255, 44/255), label=f"LVAD, ω(0)= {round(w0,2)}r/min")
|
| 845 |
point2 = ax.scatter(Vlvs[start:(start+1)], Plvs[start:(start+1)], color=(78/255, 192/255, 44/255), s=5)#, label='End Diastole')
|
| 846 |
#point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')
|
| 847 |
-
else:
|
| 848 |
-
line1 = ax.plot(Vlv0, Plv0, color='blue', label='No LVAD') #blue
|
| 849 |
-
line2 = ax.plot(Vlvs, Plvs, color=(78/255, 192/255, 44/255), label=f"LVAD, ω(0)= {round(w0,2)}r/min") #green
|
| 850 |
|
| 851 |
ax.set_xlabel('LV Volume (ml)')
|
| 852 |
ax.set_ylabel('LV Pressure (mmHg)')
|
|
|
|
| 838 |
plt.xlim((0,250))
|
| 839 |
start = (N-2)*60000
|
| 840 |
end = (N)*60000
|
| 841 |
+
line1 = ax.plot(Vlv0[start:end], Plv0[start:end], lw=1, color='b',label='No LVAD')
|
| 842 |
+
point1 = ax.scatter(Vlv0[start:end], Plv0[start:end], c="b", s=5)#, label='End Diastole')
|
| 843 |
+
|
| 844 |
if loop_simulated:
|
| 845 |
#line1 = ax.plot(Vlv0[start:end], Plv0[start:end], lw=1, color='b',label='No LVAD')
|
| 846 |
#point1 = ax.scatter(Vlv0[start:end], Plv0[start:end], c="b", s=5)#, label='End Diastole')
|
| 847 |
line2 = ax.plot(Vlvs[start:(start+1)], Plvs[start:(start+1)], lw=1, color=(78/255, 192/255, 44/255), label=f"LVAD, ω(0)= {round(w0,2)}r/min")
|
| 848 |
point2 = ax.scatter(Vlvs[start:(start+1)], Plvs[start:(start+1)], color=(78/255, 192/255, 44/255), s=5)#, label='End Diastole')
|
| 849 |
#point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')
|
| 850 |
+
#else:
|
| 851 |
+
#line1 = ax.plot(Vlv0, Plv0, color='blue', label='No LVAD') #blue
|
| 852 |
+
#line2 = ax.plot(Vlvs, Plvs, color=(78/255, 192/255, 44/255), label=f"LVAD, ω(0)= {round(w0,2)}r/min") #green
|
| 853 |
|
| 854 |
ax.set_xlabel('LV Volume (ml)')
|
| 855 |
ax.set_ylabel('LV Pressure (mmHg)')
|