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¶
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
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