Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 45c6176dba | |||
| a4bbdb90c8 |
10
changelog.md
10
changelog.md
@@ -1,4 +1,11 @@
|
|||||||
# Next Release
|
# Version 1.1.6
|
||||||
|
|
||||||
|
- Fixed Process button from appearing when no files are selected
|
||||||
|
- Fix for instand child process crash on Windows
|
||||||
|
- Added L_FREQ and H_FREQ parameters for more user control over low and high pass filtering
|
||||||
|
|
||||||
|
|
||||||
|
# Version 1.1.5
|
||||||
|
|
||||||
- Fixed Windows saves not being able to be opened by a Mac (hopefully the other way too!)
|
- Fixed Windows saves not being able to be opened by a Mac (hopefully the other way too!)
|
||||||
- Added the option to right click loaded snirf files to reveal them in a file browser or delete them if they are no longer desired
|
- Added the option to right click loaded snirf files to reveal them in a file browser or delete them if they are no longer desired
|
||||||
@@ -14,6 +21,7 @@
|
|||||||
- Added a clickable link below the selected file's metadata explaining the independent parameters and why they are useful
|
- Added a clickable link below the selected file's metadata explaining the independent parameters and why they are useful
|
||||||
- Updated some tooltips to provide better, more accurate information
|
- Updated some tooltips to provide better, more accurate information
|
||||||
- Added details about the processing steps and their order into the user guide
|
- Added details about the processing steps and their order into the user guide
|
||||||
|
- Changed the default bandpass filtering parameters
|
||||||
|
|
||||||
|
|
||||||
# Version 1.1.4
|
# Version 1.1.4
|
||||||
|
|||||||
54
flares.py
54
flares.py
@@ -50,8 +50,8 @@ from scipy.spatial.distance import cdist
|
|||||||
|
|
||||||
# Backen visualization needed to be defined for pyinstaller
|
# Backen visualization needed to be defined for pyinstaller
|
||||||
import pyvistaqt # type: ignore
|
import pyvistaqt # type: ignore
|
||||||
# import vtkmodules.util.data_model
|
import vtkmodules.util.data_model
|
||||||
# import vtkmodules.util.execution_model
|
import vtkmodules.util.execution_model
|
||||||
|
|
||||||
# External library imports for mne
|
# External library imports for mne
|
||||||
from mne import (
|
from mne import (
|
||||||
@@ -130,6 +130,9 @@ TDDR: bool
|
|||||||
|
|
||||||
ENHANCE_NEGATIVE_CORRELATION: bool
|
ENHANCE_NEGATIVE_CORRELATION: bool
|
||||||
|
|
||||||
|
L_FREQ: float
|
||||||
|
H_FREQ: float
|
||||||
|
|
||||||
SHORT_CHANNEL: bool
|
SHORT_CHANNEL: bool
|
||||||
|
|
||||||
REMOVE_EVENTS: list
|
REMOVE_EVENTS: list
|
||||||
@@ -186,7 +189,9 @@ REQUIRED_KEYS: dict[str, Any] = {
|
|||||||
"SHORT_CHANNEL": bool,
|
"SHORT_CHANNEL": bool,
|
||||||
"REMOVE_EVENTS": list,
|
"REMOVE_EVENTS": list,
|
||||||
"TIME_WINDOW_START": int,
|
"TIME_WINDOW_START": int,
|
||||||
"TIME_WINDOW_END": int
|
"TIME_WINDOW_END": int,
|
||||||
|
"L_FREQ": float,
|
||||||
|
"H_FREQ": float,
|
||||||
# "REJECT_PAIRS": bool,
|
# "REJECT_PAIRS": bool,
|
||||||
# "FORCE_DROP_ANNOTATIONS": list,
|
# "FORCE_DROP_ANNOTATIONS": list,
|
||||||
# "FILTER_LOW_PASS": float,
|
# "FILTER_LOW_PASS": float,
|
||||||
@@ -1070,8 +1075,16 @@ def filter_the_data(raw_haemo):
|
|||||||
average=True, xscale="log", color="r", show=False, amplitude=False
|
average=True, xscale="log", color="r", show=False, amplitude=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if L_FREQ == 0 and H_FREQ != 0:
|
||||||
|
raw_haemo = raw_haemo.filter(l_freq=None, h_freq=H_FREQ, h_trans_bandwidth=0.02)
|
||||||
|
elif L_FREQ != 0 and H_FREQ == 0:
|
||||||
|
raw_haemo = raw_haemo.filter(l_freq=L_FREQ, h_freq=None, l_trans_bandwidth=0.002)
|
||||||
|
elif L_FREQ != 0 and H_FREQ == 0:
|
||||||
|
raw_haemo = raw_haemo.filter(l_freq=L_FREQ, h_freq=H_FREQ, l_trans_bandwidth=0.002, h_trans_bandwidth=0.02)
|
||||||
|
|
||||||
#raw_haemo = raw_haemo.filter(l_freq=None, h_freq=0.4, h_trans_bandwidth=0.2)
|
#raw_haemo = raw_haemo.filter(l_freq=None, h_freq=0.4, h_trans_bandwidth=0.2)
|
||||||
raw_haemo = raw_haemo.filter(0.05, 0.7, h_trans_bandwidth=0.2, l_trans_bandwidth=0.02)
|
#raw_haemo = raw_haemo.filter(l_freq=None, h_freq=0.7, h_trans_bandwidth=0.2)
|
||||||
|
#raw_haemo = raw_haemo.filter(0.005, 0.7, h_trans_bandwidth=0.02, l_trans_bandwidth=0.002)
|
||||||
|
|
||||||
raw_haemo.compute_psd(fmax=2).plot(
|
raw_haemo.compute_psd(fmax=2).plot(
|
||||||
average=True, xscale="log", axes=fig_filter.axes, color="g", amplitude=False, show=False
|
average=True, xscale="log", axes=fig_filter.axes, color="g", amplitude=False, show=False
|
||||||
@@ -1517,7 +1530,6 @@ def fold_channels(raw: BaseRaw) -> None:
|
|||||||
# Format the output to make it slightly easier to read
|
# Format the output to make it slightly easier to read
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
|
|
||||||
num_channels = len(hbo_channel_names)
|
num_channels = len(hbo_channel_names)
|
||||||
rows, cols = 4, 7 # 6 rows and 4 columns of pie charts
|
rows, cols = 4, 7 # 6 rows and 4 columns of pie charts
|
||||||
fig, axes = plt.subplots(rows, cols, figsize=(16, 10), constrained_layout=True)
|
fig, axes = plt.subplots(rows, cols, figsize=(16, 10), constrained_layout=True)
|
||||||
@@ -2277,21 +2289,25 @@ def brain_landmarks_3d(raw_haemo: BaseRaw, show_optodes: Literal['sensors', 'lab
|
|||||||
|
|
||||||
|
|
||||||
if show_brodmann:# Add Brodmann labels
|
if show_brodmann:# Add Brodmann labels
|
||||||
labels = cast(list[Label], read_labels_from_annot("fsaverage", "PALS_B12_Brodmann", "rh", verbose=False)) # type: ignore
|
labels = cast(list[Label], read_labels_from_annot("fsaverage", "PALS_B12_Brodmann", "lh", verbose=False)) # type: ignore
|
||||||
|
|
||||||
label_colors = {
|
label_colors = {
|
||||||
"Brodmann.39-rh": "blue",
|
"Brodmann.1-lh": "red",
|
||||||
"Brodmann.40-rh": "green",
|
"Brodmann.2-lh": "red",
|
||||||
"Brodmann.6-rh": "pink",
|
"Brodmann.3-lh": "red",
|
||||||
"Brodmann.7-rh": "orange",
|
"Brodmann.4-lh": "orange",
|
||||||
"Brodmann.17-rh": "red",
|
"Brodmann.5-lh": "green",
|
||||||
"Brodmann.1-rh": "yellow",
|
"Brodmann.6-lh": "yellow",
|
||||||
"Brodmann.2-rh": "yellow",
|
"Brodmann.7-lh": "green",
|
||||||
"Brodmann.3-rh": "yellow",
|
"Brodmann.17-lh": "blue",
|
||||||
"Brodmann.18-rh": "red",
|
"Brodmann.18-lh": "blue",
|
||||||
"Brodmann.19-rh": "red",
|
"Brodmann.19-lh": "blue",
|
||||||
"Brodmann.4-rh": "purple",
|
"Brodmann.39-lh": "purple",
|
||||||
"Brodmann.8-rh": "white"
|
"Brodmann.40-lh": "pink",
|
||||||
|
"Brodmann.42-lh": "white",
|
||||||
|
"Brodmann.44-lh": "white",
|
||||||
|
"Brodmann.48-lh": "white",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for label in labels:
|
for label in labels:
|
||||||
@@ -2944,7 +2960,7 @@ def process_participant(file_path, progress_callback=None):
|
|||||||
|
|
||||||
# Step 11: Get short / long channels
|
# Step 11: Get short / long channels
|
||||||
if SHORT_CHANNEL:
|
if SHORT_CHANNEL:
|
||||||
short_chans = get_short_channels(raw_haemo, max_dist=0.015)
|
short_chans = get_short_channels(raw_haemo, max_dist=0.02)
|
||||||
fig_short_chans = short_chans.plot(duration=raw_haemo.times[-1], n_channels=raw_haemo.info['nchan'], title="Short Channels Only", show=False)
|
fig_short_chans = short_chans.plot(duration=raw_haemo.times[-1], n_channels=raw_haemo.info['nchan'], title="Short Channels Only", show=False)
|
||||||
fig_individual["short"] = fig_short_chans
|
fig_individual["short"] = fig_short_chans
|
||||||
else:
|
else:
|
||||||
|
|||||||
5
main.py
5
main.py
@@ -123,7 +123,10 @@ SECTIONS = [
|
|||||||
{
|
{
|
||||||
"title": "Filtering",
|
"title": "Filtering",
|
||||||
"params": [
|
"params": [
|
||||||
|
{"name": "L_FREQ", "default": 0.005, "type": float, "help": "Any frequencies lower than this value will be removed."},
|
||||||
|
{"name": "H_FREQ", "default": 0.7, "type": float, "help": "Any frequencies higher than this value will be removed."},
|
||||||
#{"name": "FILTER", "default": True, "type": bool, "help": "Calculate Peak Spectral Power."},
|
#{"name": "FILTER", "default": True, "type": bool, "help": "Calculate Peak Spectral Power."},
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -4044,7 +4047,7 @@ class MainApplication(QMainWindow):
|
|||||||
self.button2.setMinimumSize(100, 40)
|
self.button2.setMinimumSize(100, 40)
|
||||||
self.button3.setMinimumSize(100, 40)
|
self.button3.setMinimumSize(100, 40)
|
||||||
|
|
||||||
# self.button1.setVisible(False)
|
self.button1.setVisible(False)
|
||||||
self.button3.setVisible(False)
|
self.button3.setVisible(False)
|
||||||
|
|
||||||
self.button1.clicked.connect(self.on_run_task)
|
self.button1.clicked.connect(self.on_run_task)
|
||||||
|
|||||||
Reference in New Issue
Block a user