nipy/nipy — pull request #278 by mwaskom (2013-07-30 00:59:00+00:00)
Title: Fix sample_condition so events with onset at t=0 are not ignored

The sample_condition function was ignoring events that onset at t = 0 due to handling of events that onset at t < 0. I could not find a clean way to make it work in both cases, and I am not sure that it *should* work in the latter case (the convolution with the HRF wouldn't really be correct here anyway).

I added a ValueError that is raised when any of the onsets for the passed condition are negative, so that there won't be surprising results.

This might not be the optimal change to make, but the function should definitely not silently ignore events that onset at the start of the experiment.