def pastis_matrix_measurements(nseg):
    """
    Calculate the total number of measurements needed for a PASTIS matrix with nseg segments
    :param nseg: int, total number of segments
    :return: int, total number of measurements
    """
    total_number = (nseg**2 + nseg) / 2
    return int(total_number)