start of plugin support?
This commit is contained in:
@@ -105,7 +105,7 @@ from mne_nirs.statistics._glm_level_first import RegressionResults # type: igno
|
||||
from mne_connectivity.viz import plot_connectivity_circle # type: ignore
|
||||
from mne_connectivity import envelope_correlation, spectral_connectivity_epochs, spectral_connectivity_time # type: ignore
|
||||
|
||||
from src.shared.shareddata import PLATFORM_NAME, resource_path
|
||||
from src.shared.shareddata import PLATFORM_NAME, resource_path, get_app_dir
|
||||
|
||||
|
||||
|
||||
@@ -162,42 +162,7 @@ QC_METRIC_LABELS = {
|
||||
"total_processing_seconds": "Processing Time (s)",
|
||||
}
|
||||
|
||||
|
||||
ROI_MAP = {
|
||||
'ROI_OccipitoParietal_BA18_19_7': [
|
||||
'S1_D1', 'S1_D2', 'S4_D3'
|
||||
],
|
||||
'ROI_SuperiorParietal_BA7_5': [
|
||||
'S2_D1', 'S3_D1', 'S2_D2', 'S2_D4', 'S4_D4'
|
||||
],
|
||||
'ROI_TPJ_AngularGyrus_BA39_19_40': [
|
||||
'S4_D2', 'S5_D3', 'S4_D5', 'S5_D5'
|
||||
],
|
||||
# --- SPLIT BA40 REGIONS ---
|
||||
'ROI_Posterior_BA40_Parietal': [
|
||||
'S6_D4', 'S6_D5'
|
||||
],
|
||||
'ROI_Anterior_BA40_Sensorimotor': [
|
||||
'S10_D5', 'S8_D5'
|
||||
],
|
||||
# --------------------------
|
||||
'ROI_Supramarginal_Inferior_BA40_6': [
|
||||
'S6_D6'
|
||||
],
|
||||
'ROI_VentralSomatosensory_BA1_2_3_43_48': [
|
||||
'S8_D6', 'S9_D6'
|
||||
],
|
||||
'ROI_Sensorimotor_BA1_2_3_4_6': [
|
||||
'S6_D8', 'S10_D8'
|
||||
],
|
||||
'ROI_DLPFC_FEF_BA6_8_9': [
|
||||
'S7_D7', 'S7_D8'
|
||||
],
|
||||
'ROI_Broca_VLPFC_BA6_44_45_4': [
|
||||
'S9_D7', 'S10_D7'
|
||||
]
|
||||
}
|
||||
|
||||
ROI_MAP = {} # TODO: Should be grabbed from the json file
|
||||
|
||||
DOWNSAMPLE: bool
|
||||
DOWNSAMPLE_FREQUENCY: int
|
||||
@@ -345,24 +310,20 @@ FEATURE_2: bool = False
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(script_dir)
|
||||
|
||||
|
||||
# Configure logging to file with timestamps and realtime flush
|
||||
if PLATFORM_NAME == 'darwin':
|
||||
logging.basicConfig(
|
||||
filename=os.path.join(os.path.dirname(sys.executable), "../../../fnirs_analysis.log"), # Needed to get out of the bundled application
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(processName)s - %(levelname)s - %(message)s',
|
||||
datefmt='%Y-%m-%d %H:%M:%S',
|
||||
filemode='a'
|
||||
)
|
||||
|
||||
log_path = os.path.abspath(os.path.join(os.path.dirname(sys.executable), "../../../fnirs_analysis.log"))
|
||||
else:
|
||||
logging.basicConfig(
|
||||
filename='fnirs_analysis.log',
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(processName)s - %(levelname)s - %(message)s',
|
||||
datefmt='%Y-%m-%d %H:%M:%S',
|
||||
filemode='a'
|
||||
)
|
||||
log_path = os.path.join(get_app_dir(), "fnirs_analysis.log")
|
||||
|
||||
logging.basicConfig(
|
||||
filename=log_path,
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(processName)s - %(levelname)s - %(message)s',
|
||||
datefmt='%Y-%m-%d %H:%M:%S',
|
||||
filemode='a'
|
||||
)
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
@@ -514,7 +475,8 @@ def process_multiple_participants(file_paths, file_params, file_metadata,
|
||||
success_count = {"value": 0}
|
||||
failed_stages = {"value": []}
|
||||
qc_rows: list[dict[str, Any]] = []
|
||||
qc_summary_path="qc_summary.xlsx"
|
||||
if qc_summary_path is None:
|
||||
qc_summary_path = os.path.join(get_app_dir(), "qc_summary.xlsx")
|
||||
|
||||
def elapsed_heartbeat():
|
||||
# Ticks once a second so the GUI can show a live-updating timer,
|
||||
|
||||
Reference in New Issue
Block a user