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

Merge branch 'topic/default/linear-scale-temporal-spectra' into 'branch/default'

Linear scale temporal spectra

See merge request !228
Pipeline #22895 passed with stage
in 11 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