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 n(k,t) for each slice.
Calculate v(k,t) for each slice.
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 Time dependent Fourier space quantities.
Calculate and save moments of the distribution.
VelocityDistribution.copy_params(params)Create the directories and filenames where to save dataframes.
Calculate the velocity distribution of each species and save the corresponding dataframes.
VelocityDistribution.from_dict(input_dict)Update attributes from input dictionary.
Read the observable's info from the pickle file.
Read in particles data into one large array.
Calculate the normalized correlation time as given by
VelocityDistribution.normality_tests(time, ...)Calculate the Shapiro-Wilks test for each timestep from the raw velocity data and store it into a dataframe.
VelocityDistribution.parse([acf_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.
Create the message with the basic information of every observable
VelocityDistribution.save_kt_hdf([nkt_flag, ...])Save the \(n(\mathbf{k},t)\) and/or \(\mathbf{v}(\mathbf{k},t)\) data of each slice to disk.
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.
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.