;==================================================================== ; Function Name: RUT_Routine ;==================================================================== function RUT_ROUTINE, Is_Coast, $ Is_Land, $ Refl_Chn2_Clear, $ Refl_Chn2_Stddev_3x3, $ Rut_Thresh Test_Result = 0 IF (Is_Coast eq 0) THEN BEGIN ;--- compute threshold IF (Is_Land eq 1) THEN BEGIN Test_Threshold = MAX([0.5,Refl_Chn2_Clear * Rut_Thresh]) ENDIF ELSE BEGIN Test_Threshold = Rut_Thresh ENDELSE ;--- apply test IF (Refl_Chn2_Stddev_3x3 gt Test_Threshold) THEN BEGIN Test_Result = 1 ENDIF ENDIF RETURN, Test_Result end