%**************************************************************************
%This function calculates Keff at 20 C.
%
%Input:
%temp, average undulator temperature (C)
%k_eff, effective K value at the measured temperature (dimensionless)
%
%Output:
%k_eff_20c, calculated K value at 20 C (dimensionless)
%
%Zachary Wolf, 10/5/07

function [k_eff_20c] = k_calc_keff_20c(temp, k_eff)

%Calculate Keff at 20 C
%Keff changes by -.05% per degree C
%Keff = Keff_20c * (1 - 5e-4 * (temp - 20)) 
%Keff_20c = Keff * (1 + 5e-4 * (temp - 20));
k_eff_20c = k_eff * (1 + 5e-4 * (temp - 20));

%Done