Compute a basic time average of the base on a characteristic integration time using an online algorithm.
import antares myt = antares.Treatment('onlinetimeaveraging')
The input base to be averaged.
- nb_ite_averaging: int or in_attr, default= ‘in_attr’
Number of iterations over which averaging is done. If in_attr, then each zone of the base must have an attribute nb_averaging_ite.
- extracts_step: int, default= 1
The number of time iterations between two instants of the base.
- memory_mode: bool, default= False
If True, the initial base is deleted on the fly to limit memory usage.
Zones may contain multiple instants and shared variables.
Extract timestep is assumed constant.
The output base contains one instant ‘average’ and the shared instant from input base.
The following example shows a time averaging on the first 1000 iterations with an extracts step of 10.
import antares myt = antares.Treatment('onlinetimeaveraging') myt['base'] = base myt['nb_ite_averaging'] = 1000 myt['extracts_step'] = 10 myt['memory_mode'] = False base_avg = myt.execute()
The Treatment keep in memory the number of iteration accumulated