unhardcoding and general cleanup
This commit is contained in:
@@ -104,9 +104,9 @@ SECTIONS = [
|
||||
{
|
||||
"title": "Short/Long Channels",
|
||||
"params": [
|
||||
{"name": "SHORT_CHANNEL", "default": True, "type": bool, "help": "This should be set to True if the data has a short channel present in the data. For more information about short channels, please visit the Wiki."},
|
||||
{"name": "SHORT_CHANNEL_THRESH", "default": 0.015, "type": float, "depends_on": "SHORT_CHANNEL", "help": "The maximum distance the short channel can be in metres before it is no longer considered a short channel."},
|
||||
{"name": "LONG_CHANNEL_THRESH", "default": 0.045, "type": float, "help": "The maximum distance channels can be in metres. Any channel longer than this distance will be discarded."},
|
||||
{"name": "SHORT_CHANNELS", "default": True, "type": bool, "help": "This should be set to True if the data has a short channel present in the data. For more information about short channels, please visit the Wiki."},
|
||||
{"name": "SHORT_CHANNELS_THRESHOLD", "default": 0.015, "type": float, "depends_on": "SHORT_CHANNEL", "help": "The maximum distance the short channel can be in metres before it is no longer considered a short channel."},
|
||||
{"name": "LONG_CHANNELS_THRESHOLD", "default": 0.045, "type": float, "help": "The maximum distance channels can be in metres. Any channel longer than this distance will be discarded."},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -144,16 +144,16 @@ SECTIONS = [
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Cross Validation",
|
||||
"title": "Coefficient of Variation",
|
||||
"params": [
|
||||
{"name": "CV", "default": True, "type": bool, "help": "Identifies bad channels using the Coefficient of Variation."},
|
||||
{"name": "CV_THRESHOLD", "default": 20, "type": int, "depends_on": "CV", "help": "Noise threshold (%)."},
|
||||
{"name": "COEFF_VAR", "default": True, "type": bool, "help": "Identifies bad channels using the Coefficient of Variation."},
|
||||
{"name": "COEFF_VAR_THRESHOLD", "default": 20, "type": int, "depends_on": "COEFF_VAR", "help": "Noise threshold (%)."},
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Median Absolute Deviation",
|
||||
"params": [
|
||||
{"name": "MAD", "default": True, "type": bool, "help": "Identifies bad channels using Mean Absolute Deviation."},
|
||||
{"name": "MAD", "default": True, "type": bool, "help": "Identifies bad channels using Median Absolute Deviation."},
|
||||
{"name": "MAD_THRESHOLD", "default": 4, "type": int, "depends_on": "MAD", "help": "Amount of deviations before the channel is flagged bad."},
|
||||
]
|
||||
},
|
||||
@@ -166,10 +166,10 @@ SECTIONS = [
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Channel Variance",
|
||||
"title": "Sensor Dropout",
|
||||
"params": [
|
||||
{"name": "CHANNEL_VAR", "default": True, "type": bool, "help": "Identifies bad channels based on comparing the variance of the first 25% of the data to the last 25%."},
|
||||
{"name": "CHANNEL_THRESH", "default": 0.05, "type": float, "depends_on": "CHANNEL_VAR", "help": "If the end variance is less than this % of the start variance, the channel will be marked as bad."},
|
||||
{"name": "SENSOR_DROPOUT", "default": True, "type": bool, "help": "Identifies bad channels based on comparing the variance of the first 25% of the data to the last 25%."},
|
||||
{"name": "SENSOR_DROPOUT_VARIANCE_THRESHOLD", "default": 0.05, "type": float, "depends_on": "SENSOR_DROPOUT", "help": "If the end variance is less than this % of the start variance, the channel will be marked as bad."},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -206,6 +206,7 @@ SECTIONS = [
|
||||
"title": "Haemoglobin Concentration",
|
||||
"params": [
|
||||
# NOTE: Intentionally empty
|
||||
# TODO: Manual override of PPF?
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -504,6 +505,7 @@ class MainApplication(QMainWindow):
|
||||
self.missing_events_bypass = False
|
||||
self.analysis_clearing_bypass = False
|
||||
self.folding_bypass = False
|
||||
self.json_location = r"C:\Users\tyler\Desktop\research\flares\regions.json"
|
||||
|
||||
|
||||
# Initialization to ensure that saving can occur
|
||||
@@ -1063,7 +1065,8 @@ class MainApplication(QMainWindow):
|
||||
data_map["config_dict"],
|
||||
data_map["fig_bytes_dict"],
|
||||
data_map["contrast_results_dict"],
|
||||
self.folding_bypass
|
||||
self.folding_bypass,
|
||||
self.json_location
|
||||
]
|
||||
|
||||
self.launcher_window = ViewerLauncherWidget(*args)
|
||||
@@ -2500,8 +2503,9 @@ def show_critical_error(error_msg):
|
||||
message = (
|
||||
f"{APP_NAME.upper()} has encountered an unrecoverable error and needs to close.<br><br>"
|
||||
f"We are sorry for the inconvenience. An autosave was attempted to be saved to <a href='{autosave_link}'>{autosave_path}</a>, but it may not have been saved. "
|
||||
"If the file was saved, it still may not be intact, openable, or contain the correct data. Use the autosave at your discretion.<br><br>"
|
||||
f"This unrecoverable error was likely due to an error with {APP_NAME.upper()} and not your data.<br>"
|
||||
"If the file was saved, it still may not be intact, openable, or contain the correct data. Use the autosave at your own discretion.<br><br>"
|
||||
f"This unrecoverable error was due to an error with {APP_NAME.upper()} and not your data.<br>"
|
||||
f"If this crash occured inside a [BETA] branch, it is likely to eventually be fixed.<br>"
|
||||
f"Please raise an issue <a href='https://git.research.dezeeuw.ca/tyler/{APP_NAME}/issues'>here</a> and attach the error file located at <a href='{log_link}'>{log_path2}</a><br><br>"
|
||||
f"<pre>{error_msg}</pre>"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user