def get_sample_t(ref_t, idx, num_samples, sr):
    """
    Calculates Unix time for individual sample point (within a record).
    The sample point time is calculated by subtracting a multiple of
    1/sr from the reference time corresponding to the final sample point
    in the record, where sr is the sample rate.

    :param ref_t: The Unix time to use as a basis for the calculation.
    :type ref_t: float

    :param idx: The zero-based index of the sample point within the record.
    :type idx: int

    :param num_samples: The number of sample points within the record.
    :type num_samples: int

    :param sr: The sample rate (per second) of the record.
    :type sr: float

    :return: An estimated Unix time corresponding to the sample point.
    :rtype: float
    """

    return ref_t - ((1/sr)*(num_samples - 1 - idx))