def get_magnification(src2sample, sample2det):
    """
    determine the magnification (M > 1 is a demagnification)

    :param src2sample: source to sample distance [m]
    :param sample2det: sample to detector distance [m]
    """

    M = (src2sample+sample2det)/src2sample

    return M