          retdata = np.where(abs(data - mean) < limit, data, mean)
          logger.debug("Flattened outliers")
          return retdata
  
      def _remove_raw(self):
          """ Remove raw values from :attr:`stats` if they are not requested. """
          if "raw" in self._selections:
              return
          logger.debug("Removing Raw Data from output")
          for key in list(self._stats.keys()):
 
</s> remove         mean = np.mean(data)
        limit = np.std(data)
 </s> add         mean = np.mean(np.nan_to_num(data))
        limit = np.std(np.nan_to_num(data)) </s> remove     def _calc_rate(self):
 </s> add     def _calc_rate(self) -> np.ndarray: </s> remove     def _get_raw(self):
 </s> add     def _get_raw(self) -> None: </s> remove     def _flatten_outliers(cls, data):
 </s> add     def _flatten_outliers(cls, data: np.ndarray) -> np.ndarray: </s> remove         logger.debug("Got Raw Data")
 </s> add         logger.debug("Got Raw Data: %s", {k: f"Total: {len(v)}, Min: {np.nanmin(v)}, "
                                             f"Max: {np.nanmax(v)}, "
                                             f"nans: {np.count_nonzero(np.isnan(v))}"
                                          for k, v in self.stats.items()})
    def _remove_raw(self) -> None:
          retdata = np.where(abs(data - mean) < limit, data, mean)
          logger.debug("Flattened outliers")
          return retdata
  
    def _remove_raw(self) -> None:
          """ Remove raw values from :attr:`stats` if they are not requested. """
          if "raw" in self._selections:
              return
          logger.debug("Removing Raw Data from output")
          for key in list(self._stats.keys()):
keep keep keep keep replace keep keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py