shrink_blink_artifacts#
- pypillometry.signal.shrink_blink_artifacts(artifacts, profile)[source]#
Remove the fluctuations of the signal from the artifacts of blinks.
Each artifact is replaced by the median artifact plus its difference to the median artifact times the weight (see
blink_artifact_profile()): close to the core, where the blinks differ, the artifacts are kept; further away, where they only differ by the fluctuations of the signal around them, they become the median artifact.- Parameters:
artifacts (list of np.ndarray) – artifacts of the blinks (see
extract_blink_artifacts())profile (dict) – median artifact and weights (see
blink_artifact_profile())
- Return type:
- Returns:
the artifacts without the fluctuations