sccn / roiconnect

ROI connectivity analysis in EEG
39 stars 17 forks source link

Handling of the maximum value of “freq range” in pop_roi_connectplot.m function (also pop_roi_statsplot.m). #84

Closed sato16 closed 2 months ago

sato16 commented 4 months ago

Dear roiconnect developer,

I found that the maximum value was not included when I set input value of freq range in pop_roi_connectplot.m (also pop_roi_statsplot.m). I was confused about this design because I thought the maximum value would be included when freq range set. (e.g. EEGLAB's standard function timefreq.m processes including the maximum value.) Is this an intended design for some kind of analysis? Or is it just simply a bug?

If this is a bug, fixing the line 395 in pop_roi_connectplot.m and the line 73 in pop_roi_statsplot.m will solve it as shown below Before: frq_inds = find(S.freqs >= g.freqrange(1) & S.freqs < g.freqrange(2));

After: frq_inds = find(S.freqs >= g.freqrange(1) & S.freqs <= g.freqrange(2));

I'd appreciate if you could answer this question.

Best Regards, Fumiaki

nguyen-td commented 4 months ago

Hi Fumiaki,

This seems to be a bug but we (@Wirkungstreffer and myself) will have a closer look and fix it accordingly. Ideally, both the minimum values and maximum values should be included.

I will leave this issue open until we have fixed it.

Thanks, Tien

sato16 commented 4 months ago

Hi Tien, Thank you for your response. Sure, I will keep this page unclosed. I feel this toolbox is excellent and it would be my pleasure to help improve it. So if there is anything I can help with, such as reproducing bugs or providing additional information, please let me know. Best, Fumiaki

sato16 commented 2 months ago

Thank you for modifying the code! Should I close this issue?

nguyen-td commented 2 months ago

Oh yes, thanks for poking!