added function time_to_index, concert a time in seconds to a fmri time index