FUNCTION GET_FCTM_FACT9_02, input
;+
; create filter contamination factor for Ti_poly
;   factor multiplied to the thickness as of 2007/06/18
;
; IDL> fctm_factor = get_fcrm_fact9_02('2010/06/01')
; IDL> fctm_factor = get_fcrm_fact9_02(XRT_index')
;-
;-------------------------
;input='2016/06/22 19:00'
;input='2016/05/06 12:00'
;-------------------------
chk=size(input)
dtype= chk[chk[0]+1]
if dtype eq 8 then tt1=anytim(input.date_obs,/sec)/1e9 $
              else tt1=anytim(input,/sec)/1e9
;** Note: -1e9 : use smaller number to avoid losing lower digits. **
;
tim_arr=['2010/06/02 18:00','2010/06/23 18:00','2010/07/14 18:00', $
         '2010/08/04 18:00', $
         '2011/06/15 18:00','2011/07/06 18:00','2011/07/27 10:00', $
         '2012/06/07 18:00','2012/06/27 12:00','2012/07/17 06:00', $
         '2013/06/20 05:00','2013/07/11 22:00','2013/07/31 22:00', $
         '2014/06/26 12:00','2014/07/14 17:00', $
         '2015/06/28 06:00','2015/07/14 18:00', $
         '2016/07/04 18:00']
;
tim_arr2=anytim(tim_arr,/sec)/1e9
;
nn_tim=n_elements(tim_arr)
f_factr=fltarr(nn_tim)
;
;***** correction on fact ver.8 for FW2 filters *****
;    based on CALC_FILT_CTMTCK_PLT_V2.PRO
;    IDL> for i=0,nn_cum-1 do print,fw2_cum(1,i)/fw2_cum(1,0)
f_factr=[1.1206904, 1.3702666, 1.6943043, $   ; f8*1.8
         1.7608649, $
         1.9050198, 2.1326223, 2.2445647, $   ; f8*1.8
         2.3956287, 2.4466616, 2.4603471, $   ; f8*1.5
         2.5234617, 2.5791381, 2.6058158, $   ; f8*1.5
         2.6429136, 2.6612696,                ; f8*1.2
         2.6699396, 2.6729644, $              ; f8*1.1
         2.6745756]                           ; f8*1.0
;
fctm_factor=0.0   ; set initial value
if tt1 lt tim_arr(0) then fctm_factor=1.0
if tt1 ge tim_arr2(0) and tt1 lt tim_arr2(1) then fctm_factor=f_factr(0)
if tt1 ge tim_arr2(1) and tt1 lt tim_arr2(2) then fctm_factor=f_factr(1)
if tt1 ge tim_arr2(2) and tt1 lt tim_arr2(3) then fctm_factor=f_factr(2)
if tt1 ge tim_arr2(3) and tt1 lt tim_arr2(4) then fctm_factor=f_factr(3)
if tt1 ge tim_arr2(4) and tt1 lt tim_arr2(5) then fctm_factor=f_factr(4)
if tt1 ge tim_arr2(5) and tt1 lt tim_arr2(6) then fctm_factor=f_factr(5)
if tt1 ge tim_arr2(6) and tt1 lt tim_arr2(7) then fctm_factor=f_factr(6)
if tt1 ge tim_arr2(7) and tt1 lt tim_arr2(8) then fctm_factor=f_factr(7)
if tt1 ge tim_arr2(8) and tt1 lt tim_arr2(9) then fctm_factor=f_factr(8)
if tt1 ge tim_arr2(9) and tt1 lt tim_arr2(10) then fctm_factor=f_factr(9)
if tt1 ge tim_arr2(10) and tt1 lt tim_arr2(11) then fctm_factor=f_factr(10)
if tt1 ge tim_arr2(11) and tt1 lt tim_arr2(12) then fctm_factor=f_factr(11)
if tt1 ge tim_arr2(12) and tt1 lt tim_arr2(13) then fctm_factor=f_factr(12)
if tt1 ge tim_arr2(13) and tt1 lt tim_arr2(14) then fctm_factor=f_factr(13)
if tt1 ge tim_arr2(14) and tt1 lt tim_arr2(15) then fctm_factor=f_factr(14)
if tt1 ge tim_arr2(15) and tt1 lt tim_arr2(16) then fctm_factor=f_factr(15)
if tt1 ge tim_arr2(16) and tt1 lt tim_arr2(17) then fctm_factor=f_factr(16)
if tt1 ge tim_arr2(17) then fctm_factor=f_factr(17)
;
;print,fctm_factor
;
return,fctm_factor
FIN:
end
