You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been looking further into the issue of the extra column during resampling (#358, #365) and ended up with a bit of confusions regarding the implementation of to_dense().
It seems to be that during up or downsampling, the data is simply "broadcasted" instead of interpolated? Downsampling via this broadcasting and subsequent linear interpolation during 'proper' downsampling in resample() would then change the data even if nothing was done to it. @yarikoptic suggest that the default kind in resample should be 'nearest' if its broadcasting instead of linear interpolation here. Or instead to use linear interpolation to fill the values.
Are we thinking correct here?
The text was updated successfully, but these errors were encountered:
Not sure I follow... to_dense can only be called on a SparseRunVariable. Each event in a SparseRunVariable is represented strictly in terms of onset, duration, and amplitude. We're just taking that temporal information and filling a uniformly-sampled array with boxcars that have the appropriate onsets and offsets. There's no resampling happening. (I think maybe your confusion is that both sparse and dense variables store their values in .values. But the meaning is different, and since to_dense can't be called on a DenseRunVariable, you would never end up doing any actual resampling of timeseries data.)
We have been looking further into the issue of the extra column during resampling (#358, #365) and ended up with a bit of confusions regarding the implementation of
to_dense()
.pybids/bids/variables/variables.py
Lines 326 to 341 in e9fc2df
It seems to be that during up or downsampling, the data is simply "broadcasted" instead of interpolated? Downsampling via this broadcasting and subsequent linear interpolation during 'proper' downsampling in
resample()
would then change the data even if nothing was done to it. @yarikoptic suggest that the defaultkind
in resample should be 'nearest' if its broadcasting instead of linear interpolation here. Or instead to use linear interpolation to fill the values.Are we thinking correct here?
The text was updated successfully, but these errors were encountered: