opticam.utils.data_checks ========================= .. py:module:: opticam.utils.data_checks Functions --------- .. autoapisummary:: opticam.utils.data_checks.check_data opticam.utils.data_checks.parse_header_results opticam.utils.data_checks.data_checks_output Module Contents --------------- .. py:function:: check_data(out_directory, data_directory = None, c1_directory = None, c2_directory = None, c3_directory = None, barycenter = True, verbose = True, return_output = False, logger = None, number_of_processors=cpu_count() // 2) Check that the data are self-consistent. Parameters ---------- out_directory : str The directory path to which any output files will be saved. data_directory : None | str, optional The directory path to the data for all three cameras, by default None. c1_directory : None | str, optional The directory path to the data for Camera 1, by default None. c2_directory : None | str, optional The directory path to the data for Camera 2, by default None c3_directory : None | str, optional The directory path to the data for Camera 3, by default None barycenter : bool, optional Whether to apply a Barycentric correction to the image time stamps, by default True. verbose : bool, optional Whether to print any output info, by default True. return_output : bool, optional Whether to return any output, by default False. logger : Logger | None, optional The logger, by default None. number_of_processors : _type_, optional The number of processors to use, by default `cpu_count() // 2`. Returns ------- None | Tuple[Dict[str, str], int, Dict[str, float], List[str], Dict[str, float], float] If `return_output=True`, the file paths, binning scale, Barycentric MJD dates, ignored files, file gains, and the reference date are returned. Otherwise, nothing is returned. .. py:function:: parse_header_results(results, file_paths, out_directory, logger) Parse the header info results. Parameters ---------- results : Tuple[float, float, str, str, float] The header info results. file_paths : List[str] The file paths. out_directory : str The directory path to which any output files will be saved. logger : Logger | None The logger. Returns ------- Tuple[int, Dict[str, float], Dict[str, str], Dict[str, float], List[str]] The binning scale, BMJD dates, filters, gains, and ignored files. Raises ------ ValueError If more than three filters are detected. ValueError If more than one binning mode is detected. .. py:function:: data_checks_output(binning_scale, camera_files, func) Output the results of the data checks. Parameters ---------- binning_scale : int The data binning scale. camera_files : Dict[str, str] The image files separated by filter. func : Callable The output function (i.e., `print` or `logger.info`)