import logging


def calculateDelay(fSampling, receptionDelay):
    """
    Calculates delay until signal acquisition starts.

    :param fSampling: Sampling frequency of DAQ
    :param receptionDelay: Delay until reception of signals

    :return: Active delay until acquisition
    """

    logging.info('  Function    "calculateDelay"    : %s', __name__)

    delayOffsetSamples      = 45.8e-6 * fSampling
    activeDelay             = receptionDelay - delayOffsetSamples
    
    return activeDelay