pro hsi_gain_patch_high_energy, structin caltimes = anytim(['2002-Jan-01 00:00:00','2002-Feb-24 00:00:00','2002-Jul-16 00:00:00',$ '2003-Oct-10 00:00:00','2010-Dec-31 00:00:00']) + 438.d / 2.d * 3600.d calvals = [ [ 2.01445, 2.00000, 2.03822, 2.06439, 2.06050, 2.06241, 1.99201, 2.05156, 1.92204,$ -59.0996, -50.00000, -53.7795, -55.8928, -64.3702, -77.2684, -55.6824, -69.2433, -80.2980],$ [ 2.01445, 2.00000, 2.03822, 2.06439, 2.06050, 2.06241, 1.99201, 2.05156, 1.92204,$ -59.0996, -50.00000, -53.7795, -55.8928, -64.3702, -77.2684, -55.6824, -69.2433, -80.2980],$ [ 2.01333, 2.00000, 2.03621, 2.06372, 2.05946, 2.06077, 1.99218, 2.05276, 1.92128,$ -56.0152, -50.00000, -48.3776, -54.0869, -61.1624, -73.4268, -55.7005, -71.0365, -77.5309],$ [ 2.01227, 2.00000, 2.03655, 2.05444, 2.05382, 2.05835, 1.98997, 2.05096, 1.91980,$ -46.5443, -50.00000, -42.9865, -30.9645, -42.9298, -63.8858, -45.7311, -63.5312, -68.3361],$ [ 2.01227, 2.00000, 2.03655, 2.05444, 2.05382, 2.05835, 1.98997, 2.05096, 1.91980,$ -46.5443, -50.00000, -42.9865, -30.9645, -42.9298, -63.8858, -45.7311, -63.5312, -68.3361] ] for i=0,8 do structin.gains[i+18] = interpol( reform(calvals[i,*]), caltimes, structin.time) for i=0,8 do structin.offsets[i+18] = interpol( reform(calvals[i+9,*]), caltimes, structin.time) end