timeseriesο
_calculate_time_rangeο
get_combined_input_time_stepsο
- PVGeo._helpers.timeseries.get_combined_input_time_steps(algorithm, idx=0)[source]ο
This will iterate over all input ports and combine their unique timesteps for an output algorithm to have.
- Parameters:
algorithm (vtkDataObject) β The data object (Proxy) on the pipeline (pass self from algorithm subclasses)
- Returns:
a 1D array of all the unique timestep values (empty array if no time variance)
- Return type:
np.ndarray
get_input_time_stepsο
- PVGeo._helpers.timeseries.get_input_time_steps(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 (if there arenβt any, returns
None
)- Return type:
list
get_requested_timeο
- PVGeo._helpers.timeseries.get_requested_time(algorithm, outInfo, 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)
outInfo (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.get_requested_time(self, outInfo)
update_time_stepsο
- PVGeo._helpers.timeseries.update_time_steps(algorithm, nt, dt=1.0, explicit=False)[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.
explicit (boolean) β if true, this will treat the nt argument as the exact timestep values to use
- Returns:
Returns the timesteps as an array
- Return type:
numpy.array