Display

save(simu, frames, attributes, ...[, ...])

Basic saving function.

display_kinetic_particles(simu, time[, ...])

Basic quiver plot in dimension 2 and scatter plot in dimension 3.

scatter_particles(simu, time[, show, save, path])

Scatter plot with the radii of the particles.

sisyphe.display.save(simu, frames, attributes, attributes_alltimes, Nsaved=None, save_file=True, file_name='data')

Basic saving function.

Parameters
  • simu (Particles) – A model.

  • frames (list) – List of times (float) to save.

  • attributes (list) – List of strings containing the names of the attributes to save at the times in the list frames.

  • attributes_alltimes (list) – List of strings containing the names of the attributes which will be saved at each iteration until the last time in frame.

  • Nsaved (int, optional) – Default is None which means that all the particles will be saved.

  • save_file – (bool, optional): Default is True which means that a pickle file will be generated and saved in the current directory.

  • file_name (str, optional) – Default is "data".

Returns

A dictionary which contains the entry keywords "time", "frames" and all the elements of the lists attributes and attributes_alltimes. The dictionary is saved in the current directory.

Return type

dict

sisyphe.display.display_kinetic_particles(simu, time, N_dispmax=None, order=False, color=False, show=True, figsize=(6, 6), save=False, path='simu')

Basic quiver plot in dimension 2 and scatter plot in dimension 3.

Parameters
  • simu (Particles) – A model.

  • time (list) – List of times to plot.

  • N_dispmax (int, optional) – Default is None.

  • order (bool, optional) – Compute the order parameter or not. Default is False.

  • color (bool, optional) – The color of the particle depends on the velocity angle (dimension 2). Default is False.

  • show (bool, optional) – Show the plot. Default is True.

  • figsize (tuple, optional) – Figure size, default is (6,6).

  • save (bool, optional) – Save the plots. Default is False.

  • path (str, optional) – The plots will be saved in the directory './path/frames'.

Returns

Times and order parameter

Return type

list, list

sisyphe.display.scatter_particles(simu, time, show=True, save=False, path='simu')

Scatter plot with the radii of the particles.

Parameters
  • simu (Particles) – A model.

  • time (list) – List of times to plot.

  • show (bool, optional) – Show the plot. Default is True.

  • save (bool, optional) – Save the plots. Default is False.

  • path (str, optional) – The plots will be saved in the directory './path/frames'.