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

VelocityDistribution.__init__()

VelocityDistribution.calc_k_data()

Calculate and save Fourier space data.

VelocityDistribution.calc_kt_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.

VelocityDistribution.compute_hermite_expansion([...])

Calculate and save Hermite coefficients of the Grad expansion.

VelocityDistribution.compute_moments([...])

Calculate and save moments of the distribution.

VelocityDistribution.create_dirs_filenames()

VelocityDistribution.create_distribution([...])

Calculate the velocity distribution of each species and save the corresponding dataframes.

VelocityDistribution.from_dict(input_dict)

Update attributes from input dictionary.

VelocityDistribution.grab_sim_data([pva])

Read in particles data

VelocityDistribution.normality_tests(time, ...)

Calculate the Shapiro-Wilks test for each timestep from the raw velocity data.

VelocityDistribution.parse()

Grab the pandas dataframe from the saved csv file.

VelocityDistribution.parse_k_data()

Read in the precomputed Fourier space data.

VelocityDistribution.parse_kt_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.

VelocityDistribution.prepare_histogram_args()

VelocityDistribution.pretty_print()

Print information in a user-friendly way.

VelocityDistribution.read_pickle()

Read the observable's info from the pickle file.

VelocityDistribution.save_hdf()

VelocityDistribution.save_pickle()

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.

VelocityDistribution.setup_multirun_dirs()

Set the attributes postprocessing_dir and dump_dirs_list.

VelocityDistribution.time_stamp(message, timing)

Print to screen the elapsed time of the calculation.

VelocityDistribution.update_args([...])

Update observable specific attributes and call update_finish() to save info.

VelocityDistribution.update_finish()

Update the slice_steps, CCF's and DSF's attributes, and save pickle file with observable's info.