Functions available in the module

col_names(data)

Adds column names. Assumes odd columns are coordinates and even columns are energy values. Only first column gets “Coord” name, the rest are left nameless. The energy columns are names “USX”, where X is 10, 20, 30, etc.

Parameters:

data (pandas.DataFrame) – Dataset that contains US runs

Return data:

Data with column names.

Return work_columns:

List of column names (without Coord)

sub_min(data, work_columns)

Looks for minimum value of each run on the substrate side of the reaction coordinate and substracts it from all values for this run.

Parameters:
  • data (pandas.DataFrame) – Dataset that contains US runs, must be named with col_names() or with the same convention.

  • work_columns (list[str]) – A list of columns that contain energies (USX (X = 10, 20, 30..) by convention).

Return data:

Returns dataset with substracted values.

vis_fun(data, work_columns, name)

Visualises processed dataset, based on the names of columns in work-columns list and adds title (“name”).

Parameters:
  • data (pandas.DataFrame) – Dataset that contains US runs, must be name with col_names() or with the same convention.

  • work_columns (list[str]) – A list of columns that contain energies (USX (X = 10, 20, 30..) by convention).

  • name (str) – The title of the figure displayed at the top

vis_show(data, work_columns, name)

Shows the picture generated by vis_fun(). All parameters are the same as for vis_fun()

vis_save(data, work_columns, name)

Saves the picture generated by vis_fun(). All parameters are the same as for vis_fun()

odd_col(data, work_columns)

Designed to find incorrect runs (the ones that constantly increase instead of forming a maximum)

Parameters:
  • data (pandas.DataFrame) – Dataset that contains US runs, must be named with col_names() or with the same convention.

  • work_columns (list[str]) – A list of columns that contain energies (USX (X = 10, 20, 30..) by convention).

Return odd_out:

A list of columns that contain incorrect runs

split_string(list_strings)

Splits a input of strings separated by space into list of strings.

Parameters:

list_string – A long string of strings separated by a space

Return list_strings:

A list of string

del_col(work_columns, columns)

Mostly used with user input - function creates the list of runs without the ones that are mentioned in “columns”.

Parameters:
  • work_columns (list[str]) – A list of columns that contain energies (USX (X = 10, 20, 30..) by convention).

  • columns (list[str]) – Columns that should be excluded from work_columns

spread(data, odd_out)

Calculates if the spread (the difference between the maximum and minimum of energy in the product side) is smaller than 20.

Parameters:
  • data (pandas.DataFrame) – Dataset that contains US runs, must be named with col_names() or with the same convention.

  • odd_out (list[str]) – A list of columns that contain incorrect runs

list_pics(pics)

Adds .png extension to the list of stings.

Parameters:

pics (list[str]) – A list of pictures’ names.

Return pics:

A list of pictures’ names with extension .png

merge(pics, columns, name)

Merges pictures into one big figure. A number of pictures horizontally is descirbed by columns argument. Name of the file is specified by name.

Parameters:
  • pics (list[str]) – A list of pictures’ names with extension .png

  • columns (int) – A number of pictures horizontally

  • name (str) – A name of the merged file