sarkas.tools.observables.VelocityDistribution
sarkas.tools.observables.VelocityDistribution#
- class sarkas.tools.observables.VelocityDistribution[source]#
Moments of the velocity distributions defined as
\[\langle v^{\alpha} \rangle = \int_{-\infty}^{\infty} d v \, f(v) v^{2 \alpha}.\]- Variables
no_bins (int) – Number of bins used to calculate the velocity distribution.
plots_dir (str) – Directory in which to store Hermite coefficients plots.
species_plots_dirs (list, str) – Directory for each species where to save Hermite coefficients plots.
max_no_moment (int) – Maximum number of moments = \(\alpha\). Default = 6.
Methods
Calculate and save Fourier space data.
Calculate Time dependent Fourier space quantities.
VelocityDistribution.compute
([...])Calculate the moments of the velocity distributions and save them to a pandas dataframes and csv.
Calculate and save Hermite coefficients of the Grad expansion.
Calculate and save moments of the distribution.
Calculate the velocity distribution of each species and save the corresponding dataframes.
VelocityDistribution.from_dict
(input_dict)Update attributes from input dictionary.
Read in particles data
VelocityDistribution.normality_tests
(time, ...)Calculate the Shapiro-Wilks test for each timestep from the raw velocity data.
Grab the pandas dataframe from the saved csv file.
Read in the precomputed Fourier space data.
Read in the precomputed time dependent Fourier space data.
VelocityDistribution.plot
([scaling, acf, ...])Plot the observable by calling the pandas.DataFrame.plot() function and save the figure.
Print information in a user-friendly way.
Read the observable's info from the pickle file.
Save the observable's info into a pickle file.
VelocityDistribution.setup
(params[, phase, ...])Assign attributes from simulation's parameters.
VelocityDistribution.setup_init
(params[, ...])Assign Observables attributes and copy the simulation's parameters.
Set the attributes postprocessing_dir and dump_dirs_list.
VelocityDistribution.time_stamp
(message, timing)Print to screen the elapsed time of the calculation.
Update observable specific attributes and call
update_finish()
to save info.Update the
slice_steps
, CCF's and DSF's attributes, and save pickle file with observable's info.