def triggers(data_dir: str, include_trg_type: bool = False):
    """Read in the triggers.txt file. Convert the timestamps to be in
    aqcuisition clock units using the offset listed in the file (last entry).

    Parameters:
    -----------
        data_dir - data directory with the triggers.txt file
        include_trg_type - if True adds the trg type (calib, first-pres-target,
            target, non-target, etc.)
    Returns:
    --------
        list of (float, str), where float is the seconds elapsed since
            start of acquisition.

        or

        list of (float, str, targetness)
        """

    with open(f"{data_dir}/triggers.txt") as trgfile:
        records = [line.split(' ') for line in trgfile.readlines()]
        (_cname, _ctype, cstamp) = records[0]
        (_acq_name, _acq_type, acq_stamp) = records[-1]
        offset = float(acq_stamp) - float(cstamp)

        corrected = []
        for i, (name, trg_type, stamp) in enumerate(records):
            if i < len(records) - 1:
                # omit offset record for plotting
                seconds = (float(stamp) + offset)
                record = (seconds, name)
                if include_trg_type:
                    record = (seconds, name, trg_type)
                corrected.append(record)
        return corrected