timeseries

getInputTimeSteps

PVGeo._helpers.timeseries.getInputTimeSteps(algorithm, port=0, idx=0)[source]

Get the timestep values for the algorithm’s input

Parameters:
  • algorithm (vtkDataObject) – The data object (Proxy) on the pipeline (pass self from algorithm subclasses)
  • port (int) – the input port
  • idx (int) – optional : the connection index on the input port
Returns:

the time step values of the input

Return type:

list

getRequestedTime

PVGeo._helpers.timeseries.getRequestedTime(algorithm, outInfoVec, idx=0)[source]

Handles setting up the timesteps on on the pipeline for a file series reader.

Parameters:
  • algorithm (vtkDataObject) – The data object (Proxy) on the pipeline (pass self from algorithm subclasses)
  • outInfoVec (vtkInformationVector) – The output information for the algorithm
  • idx (int) – the index for the output port
Returns:

the index of the requested time

Return type:

int

Example

>>> # Get requested time index
>>> i = _helpers.getRequestedTime(self, outInfoVec)

updateTimeSteps

PVGeo._helpers.timeseries.updateTimeSteps(algorithm, nt, dt)[source]

Handles setting up the timesteps on on the pipeline for a file series reader.

Parameters:
  • algorithm (vtkDataObject) – The data object (Proxy) on the pipeline (pass self from algorithm subclasses)
  • nt (int or list) – Number of timesteps (Pass a list to use length of that list)
  • dt (float) – The discrete value in seconds for the time step.
Returns:

Returns the timesteps as an array

Return type:

numpy.array