pyJoules/energy_trace.py
def remove_idle(self, idle: List[Dict[str, float]]):
        """
        substract idle energy values from the current trace

        :param idle: list of idle consumption values to substract to current trace
                     idle consumption values must be grouped in a dictionary with their domain as key
        :raise ValueError: if the number of values in the list doesn't match the number of sample in the trace
                           or if a domain of the trace is not in the idle values
        """
        if len(idle) != len(self._samples):
            raise ValueError('idle list havn\'t the same length than the trace')

        for idle_energy, sample in zip(idle, self._samples):
            for domain in sample.energy:
                if domain not in idle_energy:
                    raise ValueError('domain not present in idle values : ' + domain)
                sample.energy[domain] -= idle_energy[domain]

        substract idle energy values from the current trace

        :param idle: list of idle consumption values to substract to current trace
                     idle consumption values must be grouped in a dictionary with their domain as key
        :raise ValueError: if the number of values in the list doesn't match the number of sample in the trace
                           or if a domain of the trace is not in the idle values
        
substract idle energy values from the current trace
substract idle energy values from the current trace
def remove_idle(self, idle: List[Dict[str, float]]):
        if len(idle) != len(self._samples):
            raise ValueError('idle list havn\'t the same length than the trace')
        for idle_energy, sample in zip(idle, self._samples):
            for domain in sample.energy:
                if domain not in idle_energy:
                    raise ValueError('domain not present in idle values : ' + domain)
                sample.energy[domain] -= idle_energy[domain]
def remove_idle ( self , idle : List [ Dict [ str , float ] ] ) : if len ( idle ) != len ( self . _samples ) : raise ValueError ( 'idle list havn\'t the same length than the trace' ) for idle_energy , sample in zip ( idle , self . _samples ) : for domain in sample . energy : if domain not in idle_energy : raise ValueError ( 'domain not present in idle values : ' + domain ) sample . energy [ domain ] -= idle_energy [ domain ]
substract idle energy values from the current trace
substract idle energy values from the current trace
"""
        substract idle energy values from the current trace

        :param idle: list of idle consumption values to substract to current trace
                     idle consumption values must be grouped in a dictionary with their domain as key
        :raise ValueError: if the number of values in the list doesn't match the number of sample in the trace
                           or if a domain of the trace is not in the idle values
        """
if the number of values in the list doesn't match the number of sample in the trace
or if a domain of the trace is not in the idle values
if the number of values in the list doesn ' t match the number of sample in the trace or if a domain of the trace is not in the idle values
ValueError
self
idle
List[Dict[str, float]]
list of idle consumption values to substract to current trace
idle consumption values must be grouped in a dictionary with their domain as key
list of idle consumption values to substract to current trace idle consumption values must be grouped in a dictionary with their domain as key