Commit 43e3bd5e authored by vlabarre's avatar vlabarre
Browse files

Remove toroidal spectrums from plot when poloidal projection (and converselly)

parent 48bb99228a05
Pipeline #34726 passed with stage
in 13 minutes and 26 seconds
......@@ -1201,8 +1201,14 @@ class SpatioTemporalSpectraNS:
EKhr = tspectra["spectrum_Khr"]
EK = EKhr + EKp
ax.plot(omegas, EK, "r", linewidth=2, label=r"$E_K$")
ax.plot(omegas, EKhr, "r--", linewidth=1, label=r"$E_{K,toro}$")
ax.plot(omegas, EKp, "r-.", linewidth=1, label=r"$E_{K,polo}$")
try:
projection = self.sim.params.projection
except AttributeError:
projection = None
if projection != "poloidal":
ax.plot(omegas, EKhr, "r--", linewidth=1, label=r"$E_{K,toro}$")
if projection != "toroidal":
ax.plot(omegas, EKp, "r-.", linewidth=1, label=r"$E_{K,polo}$")
else:
# kinetic energy
EK = tspectra["spectrum_K"]
......
......@@ -145,7 +145,11 @@ class SpectraNS3DStrat(SpectraNS3D):
_plot(spectrumK, "r", f"$E_K(k_{direction})$")
_plot(spectrumA, "b", f"$E_A(k_{direction})$")
_plot(spectrumKhd + spectrumKz, "m", "poloidal", 1)
if (
hasattr(self.sim.params, "projection")
and self.sim.params.projection != "toroidal"
):
_plot(spectrumKhd + spectrumKz, "m", "poloidal", 1)
def plot_kzkh_cumul_diss(self, tmin=0, tmax=None):
path_file = self.path_file_kzkh
......
Supports Markdown
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