11 parser = argparse.ArgumentParser(description=
"Plot thrust curve CSV")
16 default=Path(
"output/lut/thrust_curve.csv"),
17 help=
"Thrust curve CSV path",
24 help=
"Save figure path (default: input with .png)",
26 args = parser.parse_args()
28 data = np.loadtxt(args.input, delimiter=
",", skiprows=1)
32 fig, ax = plt.subplots(figsize=(8, 4))
33 ax.plot(time_s, thrust_N,
"b-", linewidth=1.5)
34 ax.set_xlabel(
"Time [s]")
35 ax.set_ylabel(
"Thrust [N]")
36 ax.set_title(
"Thrust Curve (Layer 2 pressure curves)")
37 ax.grid(
True, alpha=0.3)
38 ax.set_xlim(0, time_s[-1])
41 out = args.output
or args.input.with_suffix(
".png")
42 out.parent.mkdir(parents=
True, exist_ok=
True)
43 fig.savefig(out, dpi=150)