This instance will be upgraded to Heptapod 0.23.2 on 2021-08-05 at 11:00 UTC+2 (a few minutes of down time)

Commit f3d1a867 authored by Pierre Augier's avatar Pierre Augier
Browse files

Linear scale temporal spectra

parent ea64e1fbd599
Pipeline #22722 passed with stage
in 16 minutes and 49 seconds
......@@ -1126,6 +1126,7 @@ class SpatioTemporalSpectraNS:
tmin=0,
tmax=None,
dtype=None,
xscale="log",
):
"""plot the temporal spectra computed from the 4d spectra"""
keys_plot = self.keys_fields.copy()
......@@ -1161,7 +1162,7 @@ class SpatioTemporalSpectraNS:
f"{key_field} temporal spectrum (tmin={tmin:.3f}, tmax={tmax:.3f})\n"
+ self.output.summary_simul
)
ax.set_xscale("log")
ax.set_xscale(xscale)
ax.set_yscale("log")
# specific to strat
......
......@@ -599,7 +599,9 @@ class TemporalSpectra3D(SpecificOutput):
p_oper = self.sim.params.oper
return (0, p_oper.Lx, 0, p_oper.Ly, 0, p_oper.Lz)
def plot_spectra(self, key=None, region=None, tmin=0, tmax=None, dtype=None):
def plot_spectra(
self, key=None, region=None, tmin=0, tmax=None, dtype=None, xscale="log"
):
"""plot temporal spectra from files"""
if key is None:
key = self.keys_fields[0]
......@@ -623,7 +625,7 @@ class TemporalSpectra3D(SpecificOutput):
fig, ax = self.output.figure_axe()
ax.set_xlabel(r"$\omega$")
ax.set_ylabel("spectrum")
ax.set_xscale("log")
ax.set_xscale(xscale)
ax.set_yscale("log")
ax.set_title(
f"{key} temporal spectrum (tmin={tmin:.3f}, tmax={tmax:.3f})\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment