def reset_logging(): """Reset the logging to reflect the current configuration. This is commonly called after updating the logging configuration to let the changes take affect. """ logging_config.dictConfig(get_logging_configuration_dict())
import collections import logging import logging.config as logging_config import os from inspect import stack from contextlib import contextmanager import numpy as np import shutil from six import string_types from .__version__ import VERSION, VERSION_STATUS, __version__ from mdt.configuration import get_logging_configuration_dict try: logging_config.dictConfig(get_logging_configuration_dict()) except ValueError: print('Logging disabled') from mdt.component_templates.parameters import FreeParameterTemplate, ProtocolParameterTemplate from mdt.component_templates.cascade_models import CascadeTemplate from mdt.component_templates.batch_profiles import BatchProfileTemplate from mdt.component_templates.compartment_models import CompartmentTemplate, WeightCompartmentTemplate from mdt.component_templates.composite_models import CompositeModelTemplate from mdt.component_templates.library_functions import LibraryFunctionTemplate from mdt.model_fitting import get_batch_fitting_function from mdt.user_script_info import easy_save_user_script_info from mdt.utils import estimate_noise_std, get_cl_devices, load_input_data,\ create_blank_mask, create_index_matrix, \ volume_index_to_roi_index, roi_index_to_volume_index, load_brain_mask, init_user_settings, restore_volumes, \ apply_mask, create_roi, volume_merge, protocol_merge, create_median_otsu_brain_mask, load_samples, load_sample, \ load_nifti, write_slice_roi, apply_mask_to_file, extract_volumes, \