sarkas.tools.observables.Observable#

class sarkas.tools.observables.Observable[source]#

Parent class of all the observables.

Variables
  • dataframe (pandas.DataFrame) – Dataframe containing the observable’s data averaged over the number of slices.

  • dataframe_acf (pandas.DataFrame) – Dataframe containing the observable’s autocorrelation function data averaged over the number of slices.

  • dataframe_acf_slices (pandas.DataFrame) – Dataframe containing the observable’s autocorrelation data for each slice.

  • dataframe_slices (pandas.DataFrame) – Dataframe containing the observable’s data for each slice.

  • max_k_harmonics (list) – Maximum number of \(\mathbf{k}\) harmonics to calculate along each dimension.

  • phase (str) – Phase to analyze.

  • prod_no_dumps (int) – Number of production phase checkpoints. Calculated from the number of files in the Production directory.

  • eq_no_dumps (int) – Number of equilibration phase checkpoints. Calculated from the number of files in the Equilibration directory.

  • no_dumps (int) – Number of simulation’s checkpoints. Calculated from the number of files in the phase folder.

  • dump_dir (str) – Path to correct dump directory.

  • dump_step (int) – Correct step interval. It is either sarkas.core.Parameters.prod_dump_step or sarkas.core.Parameters.eq_dump_step.

  • no_obs (int) – Number of independent binary observable quantities. It is calculated as \(N_s (N_s + 1) / 2\) where \(N_s\) is the number of species.

  • k_file (str) – Path to the npz file storing the \(k\) vector values.

  • nkt_hdf_file (str) – Path to the npy file containing the Fourier transform of density fluctuations. \(n(\mathbf k, t)\).

  • vkt_file (str) – Path to the npz file containing the Fourier transform of velocity fluctuations. \(\mathbf v(\mathbf k, t)\).

  • k_space_dir (str) – Directory where \(\mathbf {k}\) data is stored.

  • saving_dir (str) – Path to the directory where computed data is stored.

  • slice_steps (int) – Number of steps per slice.

  • dimensional_average (bool) – Flag for averaging over all dimensions. Default = False.

  • runs (int) – Number of independent MD runs. Default = 1.

  • multi_run_average (bool) – Flag for averaging over multiple runs. Default = False. If True, runs needs be specified. It will collect data from all runs and stored them in a large ndarray to be averaged over.

Methods

Observable.__init__()

Observable.calc_k_data()

Calculate and save Fourier space data.

Observable.calc_kt_data([nkt_flag, vkt_flag])

Calculate Time dependent Fourier space quantities.

Observable.create_dirs_filenames()

Observable.from_dict(input_dict)

Update attributes from input dictionary.

Observable.grab_sim_data([pva])

Read in particles data

Observable.parse()

Grab the pandas dataframe from the saved csv file.

Observable.parse_k_data()

Read in the precomputed Fourier space data.

Observable.parse_kt_data([nkt_flag, vkt_flag])

Read in the precomputed time dependent Fourier space data.

Observable.plot([scaling, acf, figname, show])

Plot the observable by calling the pandas.DataFrame.plot() function and save the figure.

Observable.read_pickle()

Read the observable's info from the pickle file.

Observable.save_hdf()

Observable.save_pickle()

Save the observable's info into a pickle file.

Observable.setup_init(params[, phase, ...])

Assign Observables attributes and copy the simulation's parameters.

Observable.setup_multirun_dirs()

Set the attributes postprocessing_dir and dump_dirs_list.

Observable.time_stamp(message, timing)

Print to screen the elapsed time of the calculation.

Observable.update_finish()

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