Skip to content
Snippets Groups Projects
Commit 569c19bd authored by calpe's avatar calpe
Browse files

Implement tmax=None in spect_energy_budget and spectra.

parent b7a1c4ec
No related branches found
No related tags found
1 merge request!9Merged with fluiddyn/fluidsim
......@@ -207,7 +207,7 @@
self.axe_a.plot(khE + khE[1], PiE, "k")
self.axe_b.plot(khE + khE[1], PiZ, "g")
def plot(self, tmin=0, tmax=1000, delta_t=2):
def plot(self, tmin=0, tmax=None, delta_t=2):
"""Plot the energy budget."""
# Load data from file
......@@ -227,6 +227,9 @@
dset_dissEK_ky = f["dissEK_ky"].value
dset_dissEA_ky = f["dissEA_ky"].value
if tmax is None:
tmax = np.max(times)
# Average from tmin and tmax for plot
delta_t_save = np.mean(times[1:] - times[0:-1])
delta_i_plot = int(np.round(delta_t / delta_t_save))
......
......@@ -95,7 +95,7 @@
def plot1d(
self,
tmin=0,
tmax=1000,
tmax=None,
delta_t=2,
coef_compensate_kx=5. / 3,
coef_compensate_kz=3.,
......@@ -112,6 +112,9 @@
kx = dset_kxE.value
ky = dset_kyE.value
if tmax is None:
tmax = np.max(times)
# Open data set 1D spectra
dset_spectrum1Dkx_EA = h5file["spectrum1Dkx_EA"]
dset_spectrum1Dky_EA = h5file["spectrum1Dky_EA"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment