Adds QdrainEDI
This commit is contained in:
parent
582741da1d
commit
d5c124b198
1
main.py
1
main.py
|
|
@ -89,6 +89,7 @@ def format_data(data):
|
|||
"Qdilute": np.round(data.get("FM1", 0.0), 1),
|
||||
"Qdrain": np.round(data.get("FM4", 0.0), 1),
|
||||
"Qrecirc": np.round(data.get("FM3", 0.0), 1),
|
||||
"QdrainEDI": np.round(data.get("FM1", 0.0), 1)- np.round(data.get("FM2", 0.0), 1),
|
||||
"Pro": np.round(data.get("PS2", 0.0), 1),
|
||||
"Pdilute": np.round(data.get("PS3", 0.0), 1),
|
||||
"Pretentate": np.round(data.get("PS1", 0.0), 1),
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@
|
|||
Qperm: puData.Qperm,
|
||||
Qdilute: puData.Qdilute,
|
||||
Qdrain: puData.Qdrain,
|
||||
QdrainEDI: puData.QdrainEDI,
|
||||
Qrecirc: puData.Qrecirc,
|
||||
Pro: puData.Pro,
|
||||
Pdilute: puData.Pdilute,
|
||||
|
|
@ -129,9 +130,9 @@
|
|||
clearInterval(recordingInterval);
|
||||
if (recordedData.length > 0) {
|
||||
const csvContent = "data:text/csv;charset=utf-8," +
|
||||
"Timestamp,Qperm,Qdilute,Qdrain,Qrecirc,Pro,Pdilute,Pretentate,MV02_sp,MV03_sp,MV04_sp,MV05_sp,MV06_sp,MV07_sp,MV08_sp,QSkid\n" +
|
||||
"Timestamp,Qperm,Qdilute,Qdrain,QdrainEDI,Qrecirc,Pro,Pdilute,Pretentate,MV02_sp,MV03_sp,MV04_sp,MV05_sp,MV06_sp,MV07_sp,MV08_sp,QSkid\n" +
|
||||
recordedData.map(row =>
|
||||
`${row.timestamp},${row.Qperm},${row.Qdilute},${row.Qdrain},${row.Qrecirc},${row.Pro},${row.Pdilute},${row.Pretentate},${row.MV02_sp},${row.MV03_sp},${row.MV04_sp},${row.MV05_sp},${row.MV06_sp},${row.MV07_sp},${row.MV08_sp},${row.QSkid}`
|
||||
`${row.timestamp},${row.Qperm},${row.Qdilute},${row.Qdrain},${row.QdrainEDI},${row.Qrecirc},${row.Pro},${row.Pdilute},${row.Pretentate},${row.MV02_sp},${row.MV03_sp},${row.MV04_sp},${row.MV05_sp},${row.MV06_sp},${row.MV07_sp},${row.MV08_sp},${row.QSkid}`
|
||||
).join("\n");
|
||||
const encodedUri = encodeURI(csvContent);
|
||||
const link = document.createElement("a");
|
||||
|
|
@ -171,9 +172,9 @@
|
|||
}, [0, 1], maxPoints);
|
||||
|
||||
Plotly.extendTraces('flow-plot-2', {
|
||||
x: [[timestamp], [timestamp], [timestamp]],
|
||||
y: [[puData.Qdrain], [puData.Qdrain], [SkidData.QSkid]]
|
||||
}, [0, 1, 2], maxPoints);
|
||||
x: [[timestamp], [timestamp], [timestamp], [timestamp]],
|
||||
y: [[puData.Qdrain], [puData.Qrecirc], [SkidData.QSkid], [SkidData.QdrainEDI]]
|
||||
}, [0, 1, 2, 3], maxPoints);
|
||||
|
||||
Plotly.extendTraces('pressure-plot-1', {
|
||||
x: [[timestamp], [timestamp]],
|
||||
|
|
@ -233,9 +234,10 @@
|
|||
Plotly.newPlot('flow-plot-2', [
|
||||
{ x: time0, y: [0], name: 'Qdrain', mode: 'lines', line: { color: 'red' } },
|
||||
{ x: time0, y: [0], name: 'Qrecirc', mode: 'lines', line: { color: 'orange' } },
|
||||
{ x: time0, y: [0], name: 'QSkid', mode: 'lines', line: { color: 'green' } }
|
||||
{ x: time0, y: [0], name: 'QSkid', mode: 'lines', line: { color: 'green' } },
|
||||
{ x: time0, y: [0], name: 'QdrainEDI', mode: 'lines', line: { color: 'blue' } }
|
||||
], {
|
||||
title: 'Qdrain, Qrecirc and Qskid Flow Rates Over Time',
|
||||
title: 'Qdrain, Qrecirc, Qskid and QdrainEDIFlow Rates Over Time',
|
||||
xaxis: { title: 'Time', type: 'date' },
|
||||
yaxis: { title: 'Flow (L/h)' }
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user