function fmft, bt11, bt12, bt11_clr, bt12_clr, missing fmft = bt11 - bt12 idx = where(bt11 gt 260.0,cc) if (cc gt 0) then begin fmft[idx] = fmft[idx] - (bt11_clr[idx] - bt12_clr[idx]) * (bt11[idx]-260.0) / (bt11_clr[idx] - 260.0) endif idx = where(bt11 eq missing or bt12 eq missing or bt11_clr eq missing or bt12_clr eq missing,cc) if (cc gt 0) then begin fmft[idx] = missing endif return, fmft end