Compare commits
No commits in common. "7d6b3403f54ff7b9151c244852282a1de9b77e8e" and "f3bb6f870f9ac75211d19e1154f31312c18e0803" have entirely different histories.
7d6b3403f5
...
f3bb6f870f
@ -360,9 +360,6 @@ def canny_shock_finder(time_list, pressure_list, sigma = 4, derivative_threshold
|
||||
|
||||
data_ax.plot(time_list*plot_time_scale, pressure_list, '-o', label = 'original data')
|
||||
|
||||
data_ax.grid(True)
|
||||
convolution_ax.grid(True)
|
||||
|
||||
convolution_ax.plot(time_list*plot_time_scale, first_order_data, '-o', label='first order gaussian (sigma = {0})'.format(sigma))
|
||||
convolution_ax.plot(time_list*plot_time_scale, second_order_data, '-o', label='second order gaussian (sigma = {0})'.format(sigma))
|
||||
convolution_ax.plot(time_list*plot_time_scale, suppressed_data, '-o', label='first order with non-max suppression')
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Data Info File
|
||||
# Cal Wing - Oct 24
|
||||
|
||||
long_name: "Shot 5 (x2s5830) - Thin Probe Pair (ST2 & ST3) - 2024-10-17\nProtruding ST2 & ST3 - Mars Entry Conditions"
|
||||
long_name: "Shot 5 (x2s5829) - Thin Probe Pair (ST2 & ST3) - 2024-10-17\nProtruding ST2 & ST3 - Mars Entry Conditions"
|
||||
name: "Shot 5"
|
||||
date: "2024-10-18"
|
||||
time: "08:51"
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Data Info File
|
||||
# Cal Wing - Oct 24
|
||||
|
||||
long_name: "Shot 6 (x2s5831) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST3, Flush ST2 (Only Gauge 1) - Mars Entry Conditions"
|
||||
long_name: "Shot 6 (x2s5829) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST3, Flush ST2 (Only Gauge 1) - Mars Entry Conditions"
|
||||
comments: "G2 Pointless, Wasn't attached"
|
||||
name: "Shot 6"
|
||||
date: "2024-10-18"
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Data Info File
|
||||
# Cal Wing - Oct 24
|
||||
|
||||
long_name: "Shot 7 (x2s5832) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST1, Flush ST3 (Only Gauge 1) - Low Pressure, 'Pure' Air Conditions"
|
||||
long_name: "Shot 7 (x2s5829) - Thin Probe Set (ST1, ST2 & ST3) - 2024-10-18\nProtruding ST1 & ST1, Flush ST3 (Only Gauge 1) - Low Pressure, 'Pure' Air Conditions"
|
||||
name: "Shot 7"
|
||||
date: "2024-10-18"
|
||||
time: "15:58"
|
||||
|
15
main.py
15
main.py
@ -319,12 +319,7 @@ def load_data(data_path: str, data={}) -> dict:
|
||||
for i, probe in enumerate(dataInfo["probe-info"]["locations"]):
|
||||
# Get the canny-args
|
||||
cArgs = dataInfo["canny-args"]
|
||||
doCannyPlot = x2_shot == "x2s5829" and probe == "st2" and False
|
||||
plotValues = {
|
||||
"plot_title": f"Canny Shock Finding Result for {x2_shot} - ST1 Gauge 1",
|
||||
"plot_time_unit": "$\\mu$s",
|
||||
"y_label": "Voltage Reading (V)",
|
||||
}
|
||||
doCannyPlot = False
|
||||
if i in range(len(cArgs)):
|
||||
sigma = cArgs[i]["sigma"]
|
||||
post_sup_thresh = cArgs[i]["post_pres"]
|
||||
@ -341,7 +336,7 @@ def load_data(data_path: str, data={}) -> dict:
|
||||
|
||||
# Find G1 Shock Time
|
||||
if 1 in dataInfo["probe-info"]["gauges"]:
|
||||
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh1, sigma=sigma, post_suppression_threshold=post_sup_thresh, plot=doCannyPlot, start_time=time_offset, print_func=None, **plotValues)
|
||||
first_value, first_value_uncertainty, _, _ = canny_shock_finder(scope_time, probeCh1, sigma=sigma, post_suppression_threshold=post_sup_thresh, plot=doCannyPlot, start_time=time_offset, print_func=None)
|
||||
if first_value is None:
|
||||
print(f"[ERROR] {x2_shot} - {probe}-g1 could not be detected using: Sigma = {sigma}, post_suppression_threshold = {post_sup_thresh}")
|
||||
raise ValueError(f"{probe}-g1 not detected")
|
||||
@ -669,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]:
|
||||
flag = True
|
||||
avg_speed = np.array(avg_speed_lst).mean()
|
||||
avg_uncert = np.array(avg_uncert_lst).mean() # 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 += "\n" + "-"*50
|
||||
|
||||
@ -737,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]:
|
||||
flag = True
|
||||
avg_speed = np.array(avg_speed_lst).mean()
|
||||
avg_uncert = np.array(avg_uncert_lst).mean() # 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 += "\n" + "-"*50
|
||||
|
||||
@ -860,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"
|
||||
|
||||
avg_sp = np.array(avg_speeds).mean()
|
||||
avg_unc = np.array(avg_uncerts).mean() #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_unc/avg_sp * 100:.2f}%] km/s"
|
||||
|
||||
graphData["plots"].append({
|
||||
|
Loading…
x
Reference in New Issue
Block a user