code: def mask_unphysical(self, data):
          
          if not self.valid_range:
              return data
          else:
              return np.ma.masked_outside(data, np.min(self.valid_range),
                                          np.max(self.valid_range))
docs: Mask data array where values are outside physically valid range.