actual final fixes for new version
This commit is contained in:
+3
-1
@@ -11,12 +11,14 @@
|
||||
- Added basic unit testing to hopefully prevent any accidental processing changes from occurring in the future
|
||||
- Added a new parameter to the PSP section on the right side of the screen: PSP_USE_HEART_RATE_BAND. This functions similarly to the existing SCI_USE_HEART_RATE_BAND
|
||||
- Added description text to the Inter-Group and Intra-Group Brain and Image Viewers, as well as the Functional Connectivity windows to explain what output can be expected
|
||||
- Added a new Preference option of Theme. Allows from selecting Auto (System default), Light, or Dark. Fixes [Issue 7](https://git.research.dezeeuw.ca/tyler/flares/issues/7)
|
||||
- Removed image index 1 (Significance) from the Intra-Group Brain and Image Viewer as it is now provided more in depth with the Stats viewers
|
||||
- Modified the timeout when waiting for the application to close while performing updates down to a reasonable number
|
||||
- Modified the help messages for parameters in the SCI and PSP areas to better reflect how the parameters are used
|
||||
- Modified the heart rate calculation to be more precise and correct when dealing with good data and not messy data
|
||||
- Modified the heart rate calculation to not take only one channel in the data to use, but rather an average of channels. This still prefers short channels if they are present
|
||||
- Fixed an issue where loading a project from a saved project file would not allow the data to be reprocessed with new parametes
|
||||
- Fixed an issue where loading a project from a saved project file would not allow the data to be reprocessed with new parameters
|
||||
- Fixed an issue where the "Hand" BIDS metadata value would not populate on bubbles correctly
|
||||
- Fixed an issue where performing PSP could ignore the bad channels that were marked by SCI and SNR
|
||||
- Fixed an issue where the heart rate calculation would disregard all calculations and fall back to an extremely rudimentary calculation
|
||||
- Fixed an issue that could prevent log file generation while the application was in the middle of an update
|
||||
|
||||
@@ -1365,12 +1365,15 @@ def calculate_peak_power(data: BaseRaw, time_window: int = 3, threshold: float =
|
||||
psp = scores.mean(axis=1)
|
||||
bad_channels = list(compress(cast(list[str], data.ch_names), psp < threshold))
|
||||
|
||||
plot_data = data.copy()
|
||||
plot_data.info["bads"] = bad_channels
|
||||
|
||||
existing_bads = set(data.info.get("bads", []))
|
||||
data.info["bads"] = list(existing_bads | set(bad_channels))
|
||||
|
||||
# Determine the colors based on the threshold, and create the figures
|
||||
color_stops = ([0.0, threshold, threshold+0.1, threshold+0.2, 1.0], [0.0, threshold, threshold, 1.0])
|
||||
psp1, psp2 = plot_timechannel_quality_metrics(data, scores, times, color_stops, threshold, "Peak Spectral Power")
|
||||
psp1, psp2 = plot_timechannel_quality_metrics(plot_data, scores, times, color_stops, threshold, "Peak Spectral Power")
|
||||
|
||||
|
||||
return list(compress(cast(list[str], getattr(data, "ch_names")), psp < threshold)), psp1, psp2
|
||||
|
||||
Reference in New Issue
Block a user