Downsampling recording with non-integer sampling rate

Hello Brainstormers,

I’m working with the HCP resting state recordings, which are sampled at a rate of 2034.5101 Hz. I was hoping to downsample these by a factor of 4 or even 8 in order to make artifact cleaning with ICA run faster. My issue is that when using the resample process in Brainstorm, Matlab attempts to create an 80-Gb array (presumably because the new sampling rate I input must be rounded to 2 decimal places, so brainstorm tries to upsample first to get the sampling rate specified). Can anyone suggest a way to proceed?

Thanks very much,
Soren

Hi Soren,

I modified the process function, so it offers 4 decimals in the edit box, which will allow to enter “508.6275” without any truncation: https://github.com/brainstorm-tools/brainstorm3/commit/b0bf4c6d69157a107f225de043a061f94d07d041#diff-997510f307d1b3a84f1a791a70d6f908R57

In order to get access to this new option, you have to reset all the options first. In the pipeline editor, select menu “Reset option” in the last drop-down menu in the toolbar.

Another solution would be to use one of the other methods available for resampling (see: https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_resample.m#L138) but it is a bit difficult to access this from the interface, you need to call directly the function ‘Compute’ using the process “Run Matlab process”, or something like this.

Thanks for reporting this issue.
Francois

Hi Francois,

It works! Thanks very much for your quick reply.

Best,
Soren