Skip to content
Snippets Groups Projects
Commit 7ff0b5f5 authored by Ryan Godwin's avatar Ryan Godwin
Browse files

Removing utils folder and absorbing rest in hrvmeg

parent 811a86f0
No related branches found
No related tags found
1 merge request!1Progress toward getting the evaluation integrated
::: hrvmeg.utils
\ No newline at end of file
......@@ -25,7 +25,7 @@ class GetRpeaks:
self.output_sub_dir = output_sub_dir
self.ICA_value = ICA_value
def get_RR_intervals(self):
def get_R_peaks(self):
"""
The function takes in a .CSV file containing a time and a trace, and then uses
the scipy peak detection function to find peaks in the component value.
......
......@@ -10,21 +10,21 @@ from config import config
from config.config import logger
from hrvmeg import predict, compare
from py_utils import config_utils, get_files, print_info
from utils import meg_to_ica
from hrvmeg import meg_to_ica
# Initialize Typer CLI app
app = typer.Typer()
warnings.filterwarnings("ignore")
@app.command()
def extract_ica_from_meg(
def extract_ic_from_meg(
args_fp: str = "config/args.json",
experiment_name: str = "Test 1",
run_name: str = "Run1",
test_run: bool = False,
) -> None:
"""
`extract_ica_from_meg` takes in a `scan_file` (a .ds file), and outputs a .csv file with the ICA
`extract_ic_from_meg` takes in a `scan_file` (a .ds file), and outputs a .csv file with the ICA
components
:param args_fp: str = "config/args.json", defaults to config/args.json
......@@ -130,7 +130,7 @@ def label_cardiac_ic(
@app.command
def compare_ica_and_ecg(
def compare_meg_and_ecg(
args_rr: str="config/args_rr.json",
experiment_name: str= "compare ECG + MEG",
run_name: str="comparison 1"
......
......@@ -70,7 +70,7 @@ class MNE_Processor:
elif self.args["ica_method"] == "picard":
fit_params = dict(extended=True)
else:
print("Invalid ICA method must be either 'infomax', 'fastica', or 'picard'")
print("Invalid ICA method; it must be either 'infomax', 'fastica', or 'picard'")
raise (NotImplementedError)
# reject = dict(mag=5e-12, grad=4000e-13)
......
......@@ -4,7 +4,7 @@ import tensorflow_addons as tfa
from tensorflow import keras
from config import config
from utils import predict_and_vote
from hrvmeg import predict_and_vote
class label_ICA_components:
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment