Use mean uncert not sqrt(sum)
This commit is contained in:
parent
9570111f61
commit
313ef7d1de
6
main.py
6
main.py
@ -664,7 +664,7 @@ def genGraph(gData: dict, showPlot: bool = True, doLimits: bool = True, forcePlo
|
|||||||
if not flag and not gData["shock-speed"][shock_speed_loc][2]:
|
if not flag and not gData["shock-speed"][shock_speed_loc][2]:
|
||||||
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.array(avg_uncert_lst).mean() # 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
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ def genRefGraph(gData: dict, showPlot: bool = True, addShockInfo: bool = True, f
|
|||||||
if not flag and not gData["shock-speed"][shock_speed_loc][2]:
|
if not flag and not gData["shock-speed"][shock_speed_loc][2]:
|
||||||
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.array(avg_uncert_lst).mean() # 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
|
||||||
|
|
||||||
@ -855,7 +855,7 @@ def genComboRefGraph(data: dict, plotCh: list[str] = ["st1", "st2", "st3"], show
|
|||||||
probeText += f"\n{shock_speed_loc} - {speed/1000:.2f} $\\pm${uncert/1000:.2f} [{uncert/speed*100:.2f}%] km/s"
|
probeText += f"\n{shock_speed_loc} - {speed/1000:.2f} $\\pm${uncert/1000:.2f} [{uncert/speed*100:.2f}%] km/s"
|
||||||
|
|
||||||
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.array(avg_uncerts).mean() #np.sqrt(np.pow(np.array(avg_uncerts), 2).sum())
|
||||||
probeText += f"\nAverage Speed - {avg_sp/1000:.2f} $\\pm${avg_unc/1000:.2f} [{avg_unc/avg_sp * 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({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user