   (i/matrix (take n (cycle (i/identity-matrix freq)))))
 
 (defn dummy-deseasonalize
-  [freq ts]
+  [ts freq]
   ts)
 
 (defn deseasonalize

  "Interpolate over bad values and remove seasonal component using reliability."
  [freq good-set bad-set spectral-ts reli-ts]
  (-> (make-reliable good-set bad-set spectral-ts reli-ts)
      (dummy-deseasonalize freq)))

(defn reliable?
  "Checks whether the share of reliable pixels exceeds a supplied minimum.

  original time series.

  Example:
    (deseasonalize (s/sample-uniform 200) 23)"
  [ts freq]
  (cond
      (nil? ts) nil
      :else (let [x (dummy-mat freq (i/nrow ts))
