export.save_epochs_to_set#

autoclean.io.export.save_epochs_to_set(epochs, autoclean_dict, stage='post_clean_epochs', output_path=None, flagged=False)[source]#

Save epoched EEG data to EEGLAB .set format with metadata preservation.

Parameters:
epochsmne.Epochs

The epoched EEG data to save

autoclean_dictDict[str, Any]

Pipeline configuration containing stage settings, paths, and run identifier

stagestr, default=”post_clean_epochs”

Processing stage identifier used for file naming and organization

output_pathOptional[Path], default=None

Custom output directory; if None, uses stage_dir from config

flaggedbool, default=False

If True, saves to the flagged_dir instead of stage_dir

Returns:
Path: Path

Path to the saved file (stage path)