Purpose: Return a sample time that results in successive samples 180 degrees out of phase with the AC power-line (mains) frequency.

Averaging an even number of samples recorded 180 degrees out of phase with the line rejects noise at the AC-line frequency.

The standard scripts use this function to control sample-timing in the initial-delay portion of the experiment. This improves the accuracy of Eoc measurements with high-impedance reference electrodes.

This function only works properly if LineFreq field in the GAMRY.INI file is set for the proper AC-line frequency.

Usage: NewTime = LineOpt(OldTime)

NewTime REAL The time calculated to result in successive samples that are out of phase with the AC power line. This time is as close as possible to OldTime.

OldTime REAL The time used as the basis for the calculation. The calculated time is kept as close as possible to the OldTime.

Related Topics Link IconRelated Topics