copy_params_to_dir

copy_params_to_dir#

ptyrad.save.copy_params_to_dir(params_path, output_dir, params=None, verbose=True)[source]#

Copies the params file to the output directory if it exists. If the params file does not exist, it dumps the provided params dictionary to a YAML file in the output directory.

Parameters:
  • params_path (str) – Path to the params file (can be None if params are programmatically generated).

  • output_dir (str) – Directory where the params file or YAML dump will be saved.

  • params (dict, optional) – The programmatically generated params dictionary to save if no file exists.

  • verbose (bool) – Whether to print verbose messages.