Tweaked the filterGrid function so that only tests thresholds for temperatures measured during that frame