docs: def set_data(self, capacity, voltage=None,
                   capacity_label="q", voltage_label="v"
                   ):
          """Set the data"""
  
          logging.debug("setting data (capacity and voltage)")
  
          if isinstance(capacity, pd.DataFrame):
              logging.debug("recieved a pandas.DataFrame")
              self.capacity = capacity[capacity_label]
              self.voltage = capacity[voltage_label]
          else:
              assert len(capacity) == len(voltage)
              self.capacity = capacity
              self.voltage = voltage