brace.UI.PlotView package¶
Submodules¶
brace.UI.PlotView.PlotViewer module¶
- class brace.UI.PlotView.PlotViewer.DatatypeImporter[source]¶
Bases:
object- static fromHDF5(datagroup: Group) Generator[tuple[str, list[float | int]], None, None][source]¶
Gets the values name of the fields and values from the HDF5 file (less supported). The time related fields are stripped out.
- Parameters:
datagroup (h5py.Group) – The Group from the data file.
- Returns:
Generator containing a tuple of the name and the list of values.
- Return type:
Generator[tuple[str, list[float | int]]]
- static fromParquet(dataset: Series) Generator[tuple[str, list[float | int]], None, None][source]¶
Gets the values name of the fields and values from the parquet file (better supported). The time related fields are stripped out because these values are already extracted.
- Parameters:
dataset (pandas.Series) – Series data from the data file.
- Returns:
Generator containing a tuple of the name and the list of values.
- Return type:
Generator[tuple[str, list[float | int]]]
- class brace.UI.PlotView.PlotViewer.PlotWindow(*args, **kwargs)[source]¶
Bases:
QMainWindow,Ui_PlotWindow- addNewTab(datatype: type) MatplotlibWidget[source]¶
Adds a new tab containing containing a Matplotlib widget.
- Parameters:
datatype (type) – The datatype to create a new tab to.
- Returns:
The newly created widget containing the Matplotlib plot.
- Return type:
MatplotlibWidget
- checkParquetIndex(dataType: type, index: str = None) bool[source]¶
Checks whether or not the index is found in the parquet file.
- Parameters:
ds (pandas.DataFrame) – The DataFrame containing all of the data (mixed with other datatypes)
name – The name of the data type to check within the DataFrame.
index – The string index that hierarchically within the datatype (e.g. “L” and “R” in left and right).
Default: None (indicating flat). :type index: str
- Returns:
Whether or not the index is in the DataFrame.
- Return type:
bool
- getAssociatedAxes(dataType: type, axisMaps: dict[type, dict[str, Line2D]]) set[Axes][source]¶
Gets all of the axes where at least one line is related in the datalines.
- Parameters:
dataType (type) – The datatype to be checked for axes in the map.
axisMaps (dict[type, dict[str, Line2D]]) – The dictionary that organizes the lines hierarchically from type then by attribute.
- Returns:
Set of Axes that have at least one line connected to the set of dataTypes.
- Return type:
set[Axes]
- graphLegDataHdf5(fig: Figure, axisMaps: dict[type, dict[str, Line2D]], dataType: type, hdfS: HDFStore) None[source]¶
Graphs the data from the HDF5 file by updating the datastreams to include the datapoints.
- Parameters:
fig (matplotlib.Figure) – The Figure containing all the axes.
axisMaps (dict[type, dict[str, Line2D]]) – The dictionary that organizes the lines hierarchically from type then by attribute.
dataType (type) – The data type that should be graphed on the axes.
ds (pandas.HDFStore) – The HDFStore containing all of the data.
- Returns:
None
- Return type:
None
- graphLegDataParquet(fig: Figure, axisMaps: dict[type, dict[str, Line2D]], dataType: type, ds: DataFrame) None[source]¶
Graphs the data from the parquet file by updating the datastreams to include the datapoints.
- Parameters:
fig (matplotlib.Figure) – The Figure containing all the axes.
axisMaps (dict[type, dict[str, Line2D]]) – The dictionary that organizes the lines hierarchically from type then by attribute.
dataType (type) – The data type that should be graphed on the axes.
ds (pandas.DataFrame) – The DataFrame containing all of the data.
- Returns:
None
- Return type:
None
- openDataset() None[source]¶
Main function that opens a file dialog to input a file. Then opens the dataset and graphs the data. Currently “.parquet” and “.h5” are supported, with parquet files being supported the best.
- Returns:
None
- Return type:
None
- parseParquet(dataType: type, index: str = None, addSuffix: bool = True) tuple[Series, Series, DataFrame][source]¶
Reads in the data from the parquet file format, separating the time data and the other leg data.
- Parameters:
ds (pandas.DataFrame) – The DataFrame containing all of the data (mixed with other datatypes)
dataType (type) – The data type to check within the DataFrame.
index – The string index that hierarchically within the datatype (e.g. “L” and “R” in left and right).
Default: None (indicating flat). :type index: str :param addSuffix: Appends the index as a suffix on the name of the attribute in the DataFrame (e.g. kneeAngle -> kneeAngleL). Default: True :type addSuffix: bool
- Returns:
Tuple containing the time series (Unix-epoch time and uptime) and a DataFrame containing the rest of the data.
- Return type:
tuple[pandas.Series, pandas.Series, pandas.DataFrame]
- parseParquet2(dataType: type, index: str = None) DataFrame[source]¶
Parses the parquet, returning all of the data without removing time or adding suffixes. Used mostly by simulation.
- Parameters:
ds (pandas.DataFrame) – The DataFrame containing all of the data (mixed with other datatypes)
dataType (type) – The data type to check within the DataFrame.
index – The string index that hierarchically within the datatype (e.g. “L” and “R” in left and right).
Default: None (indicating flat). :type index: str
- Returns:
Pandas DataFrame containing the data, unaltered.
- Return type:
pandas.DataFrame
- parseParquetString(name: str, index: str = None) DataFrame[source]¶
Parses the parquet file, using specifically the string instead of providing the type. Remains unaltered.
- Parameters:
ds (pandas.DataFrame) – The DataFrame containing all of the data (mixed with other datatypes)
name – The name of the data type to check within the DataFrame.
index – The string index that hierarchically within the datatype (e.g. “L” and “R” in left and right).
Default: None (indicating flat). :type index: str
- Returns:
Pandas DataFrame containing the data, unaltered.
- Return type:
pandas.DataFrame
- staticMetaObject = PySide6.QtCore.QMetaObject("PlotWindow" inherits "QMainWindow": )¶