ptyrad.save

ptyrad.save#

Saving functions for PtyRAD outputs including model, arrays, params files, etc.

Functions

copy_params_to_dir(params_path, output_dir)

Copies the params file to the output directory if it exists.

make_output_folder(output_dir, indices, ...)

Generate the output folder name based on reconstruction parameters, model attributes, constraints, and loss settings.

make_save_dict(output_path, model, params, ...)

Make a dict to save relevant paramerers

save_array(data[, file_dir, file_name, ...])

Save an ND array to the specified file format.

save_dict_to_hdf5(d, output_path[, ...])

Save a nested Python dictionary to an HDF5 file.

save_results(output_path, model, params, ...)

write_hdf5(file_path, data[, dataset_name])

Save an array as an HDF5 file.

write_npy(file_path, data)

Save an array as a NumPy .npy file.

write_tif(file_path, data)

Save an array as a TIFF file.