Add spectrum plot
This commit is contained in:
parent
98426a1ab7
commit
c1f2c793c9
1 changed files with 9 additions and 0 deletions
|
@ -40,3 +40,12 @@ with out_spec.open("w") as out:
|
||||||
df = np.diff(inp['f']).min()
|
df = np.diff(inp['f']).min()
|
||||||
log.info(f"Minimum frequency delta: {df:.4f}Hz")
|
log.info(f"Minimum frequency delta: {df:.4f}Hz")
|
||||||
log.info(f"Maximum modelled time: {1/df:.0f}s")
|
log.info(f"Maximum modelled time: {1/df:.0f}s")
|
||||||
|
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
ax.plot(inp["f"], inp["S"], c="k", lw=1)
|
||||||
|
ax.autoscale(True, "x", tight=True)
|
||||||
|
ax.grid()
|
||||||
|
ax.set(xlim=0, ylim=0, xlabel="f (Hz)", ylabel="S (m^2/Hz)")
|
||||||
|
|
||||||
|
fig.savefig(out_root.joinpath("spec.pdf"))
|
||||||
|
plt.show()
|
||||||
|
|
Loading…
Reference in a new issue