-#' getSerie
-#'
-#' Return a time-serie from its centered version + level
-#'
-#' @param data A list as returned by \code{getData}
-#' @param index The index to return
-#'
-#' @export
-getSerie = function(data, index)
- data[[index]]$centered_serie + data[[index]]$level
+# isSameSeason
+#
+# Check if two months fall in the same "season" (defined by estimated pollution rate).
+#
+# @param month Month index to test
+# @param month_ref Month to compare to
+#
+.isSameSeason = function(month, month_ref)
+{
+ if (month_ref %in% c(11,12,1,2)) #~= mid-polluted
+ return (month %in% c(11,12,1,2))
+ if (month_ref %in% c(3,4,9,10)) #~= high-polluted
+ return (month %in% c(3,4,9,10))
+ return (month %in% c(5,6,7,8)) #~= non polluted
+}