Artifact Removal
Artifact Removal¶
-
class
best.dbs.artifact_removal.dataset.RCSDataset(path='/mnt/Helium/filip/Projects/2020_Sleep_Analysis/2022_sleep_architecture_only/M1/M1_nostim_1575446160.0/M1_nostim_1575446160_250Hz_filtered_e0-e3_e12-e13_e4-e5_e8-e11.mefd')¶
-
class
best.dbs.artifact_removal.dataset.StimArtifactDataset(sig_len=60, use_models=['MultiCenteriEEG_pathology', 'MultiCenteriEEG_physiology'], fs=500, use_artifacts=['RCS'], device='cpu')¶ -
property
device¶
-
to(device)¶
-
property
-
class
best.dbs.artifact_removal.dataset.StimArtifactDataset_RCS(sig_len=60, use_models=[], fs=500, use_artifacts=['RCS'], device='cpu')¶ -
property
device¶
-
to(device)¶
-
property
-
class
best.dbs.artifact_removal.model.dbs_artifact_removal_network(n_filters=64, fs=500)¶ -
property
device¶
-
forward(x_inp)¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training= None¶
-
property
-
class
best.dbs.artifact_removal.model.dbs_artifact_removal_network_(n_filters=64, fs=500)¶ -
property
device¶
-
forward(x_inp)¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training= None¶
-
property
-
class
best.dbs.artifact_removal.model.dbs_artifact_removal_network_v2¶ -
property
device¶
-
forward(x_inp)¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training= None¶
-
property
-
class
best.dbs.artifact_removal.trainer.Trainer(config)¶ -
do_epoch()¶
-
plot_to_file(x_orig, x_art, x_rec, y_art, yy_art)¶
-
print_losses_to_file(losses)¶
-
save_model()¶
-
train()¶
-
-
class
best.dbs.artifact_removal.trainer.TrainerLight(config)¶ -
do_epoch()¶
-
plot_to_file(x_orig, x_art, x_rec, y_art)¶
-
print_losses_to_file(losses)¶
-
save_model()¶
-
train()¶
-
-
class
best.dbs.artifact_removal.trainer.TrainerUpgrade(config)¶ -
do_epoch()¶
-
plot_to_file(x_orig, x_art, x_rec, y_art, yy_art)¶
-
print_losses_to_file(losses)¶
-
save_model()¶
-
train()¶
-
-
class
best.dbs.artifact_removal.trainer.Trainer_(config)¶ -
do_epoch()¶
-
plot_to_file(x_orig, x_art, x_rec, y_art, yy_art)¶
-
print_losses_to_file(losses)¶
-
save_model()¶
-
train()¶
-
-
best.dbs.artifact_removal._remove_stimulation_artifacts.remove_artifacts(x, fs, cuda=3)¶ - Parameters
x – numpy array with shape[N]
fs – 250 or 500 Hz
cuda – integer denoting id of Cuda to be used, alternatively ‘cpu’ is accepted as well
- Returns