def calc_sals_ratio_ts(sals_ts):
    """
    This function calculates the ratio between the saliency values of consecutive fixations.
    Useful for calculating rho of the full model (see paper for details).
    :param sals_ts: list of lists of time serieses of saliency values
    :return: list of lists of arrays num_images x num_subjects x (T(image, subject) - 1)
            of ratios between the saliencies.
    """
    sals_ratio_ts = []
    for sal_ts in sals_ts:
        sals_ratio_ts.append([])
        for subject_ts in sal_ts:
            sals_ratio_ts[-1].append(subject_ts[1:] / subject_ts[:-1])

    return sals_ratio_ts