subroutine average_kp_matrices_wrapper(config_label, nrepeats, overlap_mats, hamil_mats, &
overlap_mean, hamil_mean, overlap_se, hamil_se)
integer, intent(in) :: config_label, nrepeats
real(dp), intent(in) :: overlap_mats(:, :, :), hamil_mats(:, :, :)
real(dp), intent(out) :: overlap_mean(:, :), hamil_mean(:, :)
real(dp), intent(out) :: overlap_se(:, :), hamil_se(:, :)
call average_kp_matrices(nrepeats, hamil_mats, hamil_mean, hamil_se)
call average_kp_matrices(nrepeats, overlap_mats, overlap_mean, overlap_se)
if (tOutputAverageKPMatrices) then
call output_average_kp_matrix(config_label, nrepeats, 'av_hamil ', hamil_mean, hamil_se)
call output_average_kp_matrix(config_label, nrepeats, 'av_overlap', overlap_mean, overlap_se)
end if
end subroutine average_kp_matrices_wrapper