   the alert.  If the probability of clearing never exceeds the
   threshold, then a stand-in three-tuple is returned."
   [res out-m thresh]
-  (let [series (:series (:prob-series out-m))
+  (let [series (grab-series out-m)
         idx (positions #(> % thresh) series)
         offset (end-training res)]
     (if (empty? idx)

(def sample-output-map
  [{:cntry       "IDN"
    :admin       23456
    :lat         45
    :lon         90
    :pixel       5
    :prob-series (schema/timeseries-value
                  (end-training "16")
                  [0.1 0.2 0.4 0.7 0.9])
    :tres        "16"
    :sres        500
    :hansen      0}
   {:cntry       "IDN"
    :admin       23456
    :lat         46
    :lon         91
    :pixel       6
    :prob-series (schema/timeseries-value
                  (end-training "16")
                  [0.1 0.1 0.1 0.1 0.1])
    :tres        "16"
    :sres        500
    :hansen      1}
   {:cntry       "IDN"
    :admin       23456
    :lat         45.2
    :lon         90.1
    :pixel       7
    :prob-series (schema/timeseries-value
                  (end-training "16")
                  [0.1 0.2 0.4 0.7 0.9])
    :tres        "16"
    :sres        500
    :hansen      0}
   {:cntry       "IDN"
    :admin       23456
    :lat         45.3
    :lon         90.2
    :pixel       8
    :prob-series (schema/timeseries-value
                  (end-training "16")
                  [0.1 0.6 0.6 0.65 0.9])
    :tres         "16"
    :sres         500
    :hansen       1}
   {:cntry       "MYS"
    :admin       12345
    :lat         32
    :lon         89
    :pixel       5
    :prob-series (schema/timeseries-value
                  (end-training "16")
                  [0.1 0.2 0.4 0.7 0.9])
    :tres        "16"
    :sres        500
    :hansen      1}])

(defmapcatop grab-sig-pixels
  "return a vector of three-tuples, with the country iso code, the

        [forma.matrix.utils :only (transpose)]
        [forma.utils :only (positions)]
        [forma.date-time :only (period->datetime datetime->period)]
        [forma.trends.data :only (ndvi rain reli)]
        [forma.reproject :only (modis->latlon)])
  (:require [incanter.core :as i]
            [incanter.charts :as chart]
            [forma.testing :as t]
