expyfun.analyze.restore_values

expyfun.analyze.restore_values(correct, other, idx)[source]

Restore missing values from one sequence using another

Parameters:
correctarray

1D array of correct values.

otherarray

1D array of other values that have missing components.

idxarray

Indices of the values in correct that are missing from other. If None, they will be estimated from the data.

Returns:
otherarray

Array of other values, with interpolated values inserted.

idxarray

Array of indices that were interpolated.

Notes

This function works even if correct and other have different scales and shifts. Consider an experiment where the stimulus start times were saved by ExperimentController but the Eyelink system missed a SYNCTIME – this function allows the proper sample numbers to be accurately estimated.