mda_file_table_view#
Select data fields for plotting: QTableView.
Uses mda_file_table_model.MDAFileTableModel
.
|
- class mdaviz.mda_file_table_view.MDAFileTableView(*args: Any, **kwargs: Any)[source]#
- data()[source]#
Return the data from the table view: self.data= {“fileInfo”: fileInfo, “fields”: fields}
- data2Plot(selections)[source]#
Extracts selected datasets for plotting from scanDict based on user selections.
- Parameters:
selections: A dictionary with keys “X” and “Y”, where “X” is the index for the x-axis data and “Y” is a list of indices for the y-axis data.
- Returns:
A tuple of (datasets, plot_options), where datasets is a list of tuples containing the data and options (label) for each dataset, and plot_options contains overall plotting configurations.
- setData()[source]#
Populates the _data attribute with file information and data extracted from a file.
- The populated _data dictionary includes:
- fileInfo (dict): A dictionary of all the file information:
fileName (str): The name of the file without its extension.
filePath (str): The full path of the file.
folderPath (str): The full path of the parent folder.
metadata (dict): The extracted metadata from the file.
scanDict (dict): A dictionary of positioner & detector dataset for plot.
firstPos (float): The first positioner (P1, or if no positioner, P0 = index).
firstDet (float): The first detector (D01).
pvList (list of str): List of detectors PV names as strings.
- field (list): List of TableField object, one for each det/pos:
([TableField(name=’P0’, selection=None,… …desc=’Index’, pv=’Index’, unit=’a.u’),…])