Fix uncert %
This commit is contained in:
parent
df1c20f0c3
commit
f3bb6f870f
4
main.py
4
main.py
@ -665,7 +665,7 @@ def genGraph(gData: dict, showPlot: bool = True, doLimits: bool = True, forcePlo
|
|||||||
flag = True
|
flag = True
|
||||||
avg_speed = np.array(avg_speed_lst).mean()
|
avg_speed = np.array(avg_speed_lst).mean()
|
||||||
avg_uncert = np.sqrt(np.sum(np.pow(np.array(avg_uncert_lst), 2)))
|
avg_uncert = np.sqrt(np.sum(np.pow(np.array(avg_uncert_lst), 2)))
|
||||||
probeText += f"\nAverage Speed - {avg_speed/1000:.2f} $\\pm${avg_uncert/1000:.2f} [{avg_uncert/avg_speed * 100:.2f}] km/s"
|
probeText += f"\nAverage Speed - {avg_speed/1000:.2f} $\\pm${avg_uncert/1000:.2f} [{avg_uncert/avg_speed * 100:.2f}%] km/s"
|
||||||
probeText += "\n" + "-"*50
|
probeText += "\n" + "-"*50
|
||||||
|
|
||||||
probeText += "\n"
|
probeText += "\n"
|
||||||
@ -856,7 +856,7 @@ def genComboRefGraph(data: dict, plotCh: list[str] = ["st1", "st2", "st3"], show
|
|||||||
|
|
||||||
avg_sp = np.array(avg_speeds).mean()
|
avg_sp = np.array(avg_speeds).mean()
|
||||||
avg_unc = np.sqrt(np.pow(np.array(avg_uncerts), 2).sum())
|
avg_unc = np.sqrt(np.pow(np.array(avg_uncerts), 2).sum())
|
||||||
probeText += f"\nAverage Speed - {avg_sp/1000:.2f} $\\pm${avg_unc/1000:.2f} [{avg_sp/avg_unc * 100:.2f}] km/s"
|
probeText += f"\nAverage Speed - {avg_sp/1000:.2f} $\\pm${avg_unc/1000:.2f} [{avg_unc/avg_sp * 100:.2f}%] km/s"
|
||||||
|
|
||||||
graphData["plots"].append({
|
graphData["plots"].append({
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user