def get_dwell_time(dicom_img, dcm_info):
    """ Get the dwell time or effective echo spacing.
        Returns effective echo spacing written in dcm_info for Siemens and GE
        scanners and compute it for Philips scanner as described in:
        https://www.spinozacentre.nl/wiki/index.php/NeuroWiki:Current_\\
        developments

    For further references see:
    http://support.brainvoyager.com/functional-analysis-preparation/
    27-pre-processing/459-epi-distortion-correction-echo-spacing.html
    and
    https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/
    Faq#How_do_I_know_what_to_put_into_my_--acqp_file

    Parameters
    ----------
    dicom_img: dicom.dataset.FileDataset object
        one of the dicom image loaded by pydicom.
    dcm_info: dict
        dictionary containing dicom metadata.

    Returns
    -------
    dwell_time: float
        effective echo spacing in s.
    """
    manufacturer = dcm_info['Manufacturer']
    if manufacturer.upper() in ['SIEMENS', 'GE MEDICAL SYSTEMS', 'GE']:
        dwell_time = dcm_info['EffectiveEchoSpacing']
    elif manufacturer.upper() in ['PHILIPS MEDICAL SYSTEMS', 'PHILIPS']:
        gyromagnetic_proton_gamma_ratio = 42.576 * pow(10, 6)
        b0 = float(dicom_img[24, 135].value)
        water_fat_difference = 3.35 * pow(10, -6)
        delta_b0 = water_fat_difference * b0
        fourier_partial_ratio = dicom_img[24, 147].value
        acceleration_factor = dicom_img[int('2005', 16), int('140f', 16)][0][
            24, 36969].value
        nb_phase_encoding_steps = float(dicom_img[24, 137].value)
        Ny = float(nb_phase_encoding_steps) * (float(fourier_partial_ratio) /
            100)
        Ny = Ny / acceleration_factor
        BW_Nx = float(dicom_img[24, 149].value)
        water_shift_pixel = (gyromagnetic_proton_gamma_ratio * delta_b0 *
            Ny / BW_Nx)
        resonance_frequency = 42.576 * pow(10, 6)
        water_shift_hertz = b0 * water_fat_difference * resonance_frequency
        etl = float(dicom_img[24, 137].value)
        dwell_time = water_shift_pixel / (water_shift_hertz * etl /
            acceleration_factor)
    else:
        raise ValueError('Unknown manufacturer : {0}...'.format(manufacturer))
    return dwell_time
