FUNCTION GET_FCTM_FACT9_10, input
;+
; create filter contamination factor for Al_poly
;   factor multiplied to the thickness as of 2007/06/18
;
; IDL> fctm_factor = get_fcrm_fact9_01('2010/06/01')
; IDL> fctm_factor = get_fcrm_fact9_01(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 from FCTM ver.8 for FW1 filters *****
;      based on CALC_FILT_CTMTCK_PLT_V2.PRO
;      IDL> for i=0,nn_cum-1 do print,fw1_cum(0,i)/fw1_cum(0,0)
f_factr=[1.0000000, 1.0000000, 1.0000000, $ ; no contam on side positions
         1.0000000, $
         1.0000000, 1.0000000, 1.0000000, $ ;   while FW1 was kept open
         1.0000000, 1.0000000, 1.0000000, $ ;   from 2010 -- 2014
         1.0000000, 1.0000000, 1.0000000, $
         1.0000000, 1.0041364,  $   ; 2014    same as f8 after 7/1
         1.0093845, 1.0127063,  $   ; 2015    same as f8
         1.0220564]                 ; 2016    same as f8
;
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
