TimeConstraint
This is the object to be used when defining time constraints for a simulation.
- class pyconturb.TimeConstraint(data=None, index: Axes | None = None, columns: Axes | None = None, dtype: Dtype | None = None, copy: bool | None = None)[source]
DataFrame-style object that specfies time constraints for simulation.
The TimeConstraint object is essentially a pandas.DataFrame with a particular structure and some added useful methods. The first four rows correspond to
k
,x
,y
andz
. The remaining rows are time steps. Each column corresponds to a different location/turbulence component. The index must be of the form['k', 'x', 'y', 'z', <float array of time steps>]
. The columns need not have names.The object can be pickled/saved using same methods as pandas. To reload, load a properly-formatted pandas.DataFrame using the usual methods and pass it into the object: e.g.,``TimeConstraint(pd.read_csv(path))``.
- Parameters
data (ndarray (structured or homogeneous), Iterable, dict, or DataFrame.) – Dict can contain Series, arrays, constants, or list-like objects.
index (Index or array-like) – Index to use for resulting frame. Will default to RangeIndex if no indexing information part of input data and no index provided
columns (Index or array-like) – Column labels to use for resulting frame. Will default to RangeIndex (0, 1, 2, …, n) if no column labels are provided
dtype (dtype, default None) – Data type to force. Only a single dtype is allowed. If None, infer
copy (boolean, default False) – Copy data from inputs. Only affects DataFrame / 2d ndarray input