mpacts.io. readerstatebase

In order to be able to use this module import it like this:

import mpacts.io.readerstatebase
#or assign it to a shorter name
import mpacts.io.readerstatebase as rea

ReaderStateBase

class mpacts.io.readerstatebase.ReaderStateBase(BaseName_in, suffix, doNotThrow)

Bases: object

State object to access the contents of a DEMeter written file(s). Can be used as an iterator (iterating over all saved time-steps) and with direct access ‘[]’ operator to access a specific time/time-step.

The ‘get’ member is used to return a specific array from the file.

ReaderStateBase(name, parent, **kwargs)
get_time()

returns either simply the step, or, if time-per output step is set, this timestep*step

guess_BaseName(BaseName=None, doNotThrow=False)
load_pcNames_and_sizes()
pcNames()

Returning all found pcNames (as contained in sizeDict).

set_time_per_output(time)

To facilitate getting the time of an output step, you can give a global time per outputstep.