import logging

from ..model import PyMcaXrfConfiguration

logger = logging.getLogger(__name__)


def force_batch_fitting(configuration: PyMcaXrfConfiguration):
    # Force no weights (for spectra with low counts):
    if configuration.fit.fitweight:
        logger.warning("PyMca configuration: disable counting statistics propagation")
        configuration.fit.fitweight = 0
