def median(self, idx, jdx):
    ' Calculate the median value in each grid cell.\n        \n        The method used here to provide a "running median" is for each add(),\n        calculate the average of the existing value with the median of the\n        new points. This method works reasonably well, but can produce\n        inferior results if a single add() contains only outliers and their\n        are insufficient additional adds to constrain it.'
    self.zw[(idx, jdx)] = np.nanmean(np.append(self.zw[(idx, jdx)], np.nanmedian(self._z[self._II])))
    self.ww[(idx, jdx)] = 1
    self.varw[(idx, jdx)] = np.nansum(np.append(np.power((self._z[self._II] - (self.zw[(idx, jdx)] / self.ww[(idx, jdx)])), 2), self.varw[(idx, jdx)]))
    pass
Calculate the median value in each grid cell.

The method used here to provide a "running median" is for each add(),
calculate the average of the existing value with the median of the
new points. This method works reasonably well, but can produce
inferior results if a single add() contains only outliers and their
are insufficient additional adds to constrain it.
def median(self, idx, jdx):
    ' Calculate the median value in each grid cell.\n        \n        The method used here to provide a "running median" is for each add(),\n        calculate the average of the existing value with the median of the\n        new points. This method works reasonably well, but can produce\n        inferior results if a single add() contains only outliers and their\n        are insufficient additional adds to constrain it.'
    self.zw[(idx, jdx)] = np.nanmean(np.append(self.zw[(idx, jdx)], np.nanmedian(self._z[self._II])))
    self.ww[(idx, jdx)] = 1
    self.varw[(idx, jdx)] = np.nansum(np.append(np.power((self._z[self._II] - (self.zw[(idx, jdx)] / self.ww[(idx, jdx)])), 2), self.varw[(idx, jdx)]))
    pass