         (- ?period-new-res epoch :> ?rp)
         (min-period ?rp :> ?p)
         (r/modis->latlon ?sres ?modh ?modv ?s ?l :> ?lat ?lon)
-        (latlon-valid? ?lat ?lon) ;; Skip if lat/lon invalid.
+        (latlon-valid? ?lat ?lon)
         (latlon->tile ?lat ?lon zoom :> ?x ?y ?z))))

  Arguments:
    start - Start period date string.
    src - The source tap for FORMA data.
    thresh - The threshold number for valid detections.
    tres - The temporal resolution as a string.
    tres-out - The output temporal resolution as a string.
    zoom - The map zoom level."
  [src zoom tres tres-out start thresh]
  (let [epoch (date/datetime->period tres-out "2000-01-01")
        start-period (date/datetime->period tres start)]
    (<- [?x ?y ?z ?p]
        (src ?sres ?modh ?modv ?s ?l ?prob-series)
        (o/clean-probs ?prob-series :> ?clean-series)
        (first-hit thresh ?clean-series :> ?first-hit-idx)
        (+ start-period ?first-hit-idx :> ?period)

            [forma.date-time :as date]
            [cascalog.ops :as c]))

(defbufferop min-period
  "Returns the minimum value in tuples."
  [tuples]
