Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 13695)
+++ /trunk/ippTools/src/dettool.c	(revision 13696)
@@ -839,4 +839,18 @@
             if (!psMetadataAddF32(where, PS_LIST_TAIL, "airmass", PS_META_DUPLICATE_OK, "<=", select_airmass_max)) {
                 psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+                psFree(where);
+                return false;
+            }
+        }
+
+        psF32 select_sat_pixel_frac_max = psMetadataLookupF32(&status, config->args, "-select_sat_pixel_frac_max");
+        if (!status) {
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -select_sat_pixel_frac_max");
+            psFree(where);
+            return false;
+        }
+        if (isfinite(select_sat_pixel_frac_max)) {
+            if (!psMetadataAddF32(where, PS_LIST_TAIL, "sat_pixel_frac", PS_META_DUPLICATE_OK, "<=", select_sat_pixel_frac_max)) {
+                psError(PS_ERR_UNKNOWN, false, "failed to add item sat_pixel_frac");
                 psFree(where);
                 return false;
Index: /trunk/ippTools/src/dettoolConfig.c
===================================================================
--- /trunk/ippTools/src/dettoolConfig.c	(revision 13695)
+++ /trunk/ippTools/src/dettoolConfig.c	(revision 13696)
@@ -176,4 +176,6 @@
     psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-select_airmass_max",  0,
             "define max airmass", NAN);
+    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-select_sat_pixel_frac_max",  0,
+            "define max fraction of saturated pixels", NAN);
     psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-select_exp_time_min",  0,
             "define min exposure time", NAN);
