peak_power results 0 for the last channels of all of my datasets

Dear Community,
I have a problem with one of the mne-nirs specific functions, specifically the function called “peak_power”. I hope that some experienced mne-nirs user can help me! Maybe @rob-luke ?

  • MNE version: 1.6
  • MNE-NIRS version: 0.6
  • operating system: Windows 11

This is my dataset:

Here is my minimal working example:

import mne
import mne_nirs

snirf_path = "test.snirf"
raw_intensity = read_raw_snirf(fname=snirf_path, verbose=False)
raw_od = optical_density(raw_intensity)
raw_od.plot(n_channels=40, duration=300, show_scrollbars=False);

As you can see there exists data for all 40 channels.

Now I run the peak_power function for the data and visualize the results.

raw_od, scores, times = mne_nirs.preprocessing.peak_power(raw_od, threshold=0.1)
plot = mne_nirs.visualisation.plot_timechannel_quality_metric(raw_od, scores, times, threshold=0.1)

As you can see the last 19 channels all get a peak power value of 0 for all time windows. Can you help me find the cause?

Thank you in advance!
Regards

Ok, so it turned out, that after reordering the channels appropriately, everything works now!

    raw_intensity.reorder_channels(['S1_D1 760','S1_D1 850','S1_D2 760','S1_D2 850','S2_D1 760','S2_D1 850','S2_D2 760','S2_D2 850','S2_D3 760','S2_D3 850','S3_D2 760','S3_D2 850','S3_D3 760','S3_D3 850','S3_D4 760','S3_D4 850','S4_D3 760','S4_D3 850','S4_D4 760','S4_D4 850','S5_D5 760','S5_D5 850','S5_D6 760','S5_D6 850','S6_D5 760','S6_D5 850','S6_D6 760','S6_D6 850','S6_D7 760','S6_D7 850','S7_D6 760','S7_D6 850','S7_D7 760','S7_D7 850','S7_D8 760','S7_D8 850','S8_D7 760','S8_D7 850','S8_D8 760','S8_D8 850'])

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.