Back to the main page.
Bug 2361 - time axes passed onto preproc() contain nans after adding padding
| Status | CLOSED FIXED |
| Reported | 2013-11-04 14:37:00 +0100 |
| Modified | 2014-01-29 13:28:42 +0100 |
| Product: | FieldTrip |
| Component: | preproc |
| Version: | unspecified |
| Hardware: | PC |
| Operating System: | Windows |
| Importance: | P3 normal |
| Assigned to: | Eelke Spaak |
| URL: | |
| Tags: | |
| Depends on: | |
| Blocks: | |
| See also: |
Eelke Spaak - 2013-11-04 14:37:15 +0100
Eelke Spaak - 2013-11-04 14:43:44 +0100
In preproc() the sampling rate is computed (line 111) by fsample = 1./mean(diff(time)), which of course then returns nan. It seems the nan-padded time axis was introduced in relation to bug 2220 (see ft_preprocessing line 321); probably wise to mention this here so people get alerted. For now, I think I will just change the fsample line above to use nanmean(). This seems to solve the issue. Committed as 8714.