def get_rt(spectrum):
    """
    Extracts RT value from a pymzml spectrum object
    :param spectrum: a pymzml spectrum object
    :return: the retention time (in seconds)
    """
    rt, units = spectrum.scan_time
    if units == 'minute':
        rt *= 60.0
    return rt
