astrohack.utils.verification_tools

Functions

are_lists_equal(list_a, list_b)

are_fits_files_close(fits_path1, fits_path2[, tol])

are_png_files_close(img_path1, img_path2[, tol])

capture_prints_from_function(function[, args])

are_txt_files_equal(txt_path1, txt_path2[, ...])

is_captured_output_equal_to_txt_reference(function, ...)

are_dicts_close(dict_a, dict_b[, tol, ignored_keys])

Compares dictionaries and returns True if data is close up to tolerance.

are_data_trees_close(tree_a, tree_b[, tol])

Compares data trees and returns True if data is close up to tolerance.

add_data_folder_to_names_in_class(class_ref)

relative_difference(result, expected)

analyse_summary(mds_obj, exp_file_name, ...)

analyse summary file

create_origin_dict(caller)

Module Contents

are_lists_equal(list_a, list_b)[source]
are_fits_files_close(fits_path1, fits_path2, tol=1e-05)[source]
are_png_files_close(img_path1, img_path2, tol=1e-05)[source]
capture_prints_from_function(function, args=None)[source]
are_txt_files_equal(txt_path1, txt_path2, ignored_key_words=())[source]
is_captured_output_equal_to_txt_reference(function, txt_ref, args=None)[source]
are_dicts_close(dict_a, dict_b, tol=1e-08, ignored_keys=None)[source]

Compares dictionaries and returns True if data is close up to tolerance.

Parameters:
  • dict_a (dict) – First dictionary

  • dict_b (dict) – Second dictionary

  • tol (float) – Tolerance

  • ignored_keys (list, NoneType) – Keys to be ignored in comparison

Returns:

is_close

Return type:

bool

are_data_trees_close(tree_a, tree_b, tol=1e-08)[source]

Compares data trees and returns True if data is close up to tolerance. :param tree_a: First data tree :type tree_a: xarray.DataTree

Parameters:
  • tree_b (xarray.DataTree) – Second data tree

  • tol (float) – Tolerance

Returns:

is_close

Return type:

bool

add_data_folder_to_names_in_class(class_ref)[source]
relative_difference(result, expected)[source]
analyse_summary(mds_obj, exp_file_name, exp_input_pars, exp_ant_keys_list)[source]

analyse summary file

create_origin_dict(caller)[source]