Adding solver parameters in the PDF report
This commit is contained in:
parent
bd719e0c11
commit
880667e488
|
@ -7,7 +7,7 @@ Created on Fri Jul 17 05:34:59 2020
|
|||
|
||||
from fpdf import FPDF
|
||||
|
||||
def generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd):
|
||||
def generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd,T_cyc,n_cyc,N_ts,dt):
|
||||
class PDF(FPDF):
|
||||
def header(self):
|
||||
# Arial bold 15
|
||||
|
@ -133,7 +133,7 @@ def generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd):
|
|||
for i in range(0,len(Q_avg)):
|
||||
pdf.set_x(80)
|
||||
pdf.cell(width_cell[0],10,'ROI-'+ str(i+2),1,0,'C')
|
||||
pdf.cell(width_cell[1],10,str(round(Q_avg[i],2)),1,1,'C')
|
||||
pdf.cell(width_cell[1],10,str(round(Q_avg[i],3)),1,1,'C')
|
||||
|
||||
|
||||
pdf.print_section(4, 'Checking Inlet Flow Waveform and time steps saved')
|
||||
|
@ -162,5 +162,11 @@ def generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd):
|
|||
pdf.cell(width_cell[0],10,str(Rc_C_Rd[i][1]),1,0,'C') # Third column of row 1
|
||||
pdf.cell(width_cell[0],10,str(Rc_C_Rd[i][2]),1,1,'C') # Third column of row 1
|
||||
|
||||
pdf.print_section(6, 'Solver Parameters')
|
||||
pdf.set_font('Arial', '', 10)
|
||||
pdf.cell(0, 10,'Cardiac cycle period - ' + str(T_cyc) + 's', 0, 1)
|
||||
pdf.cell(0, 10,'Number of cycles - ' + str(n_cyc), 0, 1)
|
||||
pdf.cell(0, 10,'Number of time steps - ' + str(N_ts), 0, 1)
|
||||
pdf.cell(0, 10,'Time step size - ' + str(dt) + 's', 0, 1)
|
||||
|
||||
pdf.output(save_path + '/' + project + '-report.pdf', 'F')
|
2
main.py
2
main.py
|
@ -68,4 +68,4 @@ txt1 = periodicity(project,folder,dt,T_cyc,n_cyc,save_path)
|
|||
txt2 = inlet_flow_waveform(project_folder,t_btw_rst,N_ts,dt,T_cyc,n_cyc,save_path)
|
||||
|
||||
# Create PDF report
|
||||
generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd)
|
||||
generatePDF(save_path,project,DBP,MBP,SBP,PP,Q_avg,txt1,txt2,Rc_C_Rd,T_cyc,n_cyc,N_ts,dt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user