lyse.__main__.DataFrameModel

class lyse.__main__.DataFrameModel(view, exp_config)[source]

Bases: QObject

__init__(view, exp_config)[source]

Methods

__init__(view, exp_config)

add_files(filepaths, new_row_data[, done])

Add files to the dataframe model.

blockSignals(self, b)

childEvent(self, a0)

children(self)

connectNotify(self, signal)

connect_signals()

customEvent(self, a0)

deleteLater(self)

disconnect(-> bool)

disconnectNotify(self, signal)

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

event(self, a0)

eventFilter(self, a0, a1)

findChild(-> QObjectT)

findChildren(...)

get_first_incomplete()

Returns the filepath of the first shot in the model that has not been analysed

infer_objects()

Convert columns in the dataframe with dtype 'object' into compatible, more specific types, if possible.

inherits(self, classname)

installEventFilter(self, a0)

isSignalConnected(self, signal)

isWidgetType(self)

isWindowType(self)

killTimer(self, id)

mark_as_deleted_off_disk(filepath)

mark_selection_not_done()

metaObject(self)

moveToThread(self, thread)

new_row(filepath[, done])

objectName(self)

on_double_click(index)

on_remove_selection()

on_view_context_menu_requested(point)

parent(self)

property(self, name)

pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal.

receivers(self, signal)

removeEventFilter(self, a0)

remove_selection([confirm])

renumber_rows([add_from])

Add/update row indices - the rows are numbered in simple sequential order for easy comparison with the dataframe.

sender(self)

senderSignalIndex(self)

setObjectName(self, name)

setParent(self, a0)

setProperty(self, name, value)

set_columns_visible(columns_visible)

set_status_percent(filepath, status_percent)

signalsBlocked(self)

startTimer(self, interval[, timerType])

thread(self)

timerEvent(self, a0)

tr(self, sourceText[, disambiguation, n])

update_column_levels()

Pads the keys and values of our lists of column names so that they still match those in the dataframe after the number of levels in its multiindex has increased (the number of levels never decreases, given the current implementation of concat_with_padding())

update_row(filepath[, ...])

"Updates a row in the dataframe and Qt model to the data in the HDF5 file for that shot.

Attributes

COL_FILEPATH

COL_STATUS

ROLE_DELETED_OFF_DISK

ROLE_STATUS_PERCENT

columns_changed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

destroyed

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

objectNameChanged

int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

staticMetaObject

COL_FILEPATH = 1
COL_STATUS = 0
ROLE_DELETED_OFF_DISK = 258
ROLE_STATUS_PERCENT = 257
add_files(filepaths, new_row_data, done=False)[source]

Add files to the dataframe model. New_row_data should be a dataframe containing the new rows.

columns_changed

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

connect_signals()[source]
get_first_incomplete()[source]

Returns the filepath of the first shot in the model that has not been analysed

infer_objects()[source]

Convert columns in the dataframe with dtype ‘object’ into compatible, more specific types, if possible. This improves pickling performance and ensures multishot analysis code does not encounter columns with dtype ‘object’ for non-mixed numerical data, which it might choke on.

mark_as_deleted_off_disk(filepath)[source]
mark_selection_not_done()[source]
new_row(filepath, done=False)[source]
on_double_click(index)[source]
on_remove_selection()[source]
on_view_context_menu_requested(point)[source]
remove_selection(confirm=True)[source]
renumber_rows(add_from=0)[source]

Add/update row indices - the rows are numbered in simple sequential order for easy comparison with the dataframe. add_from allows you to only add numbers for new rows from the given index as a performance optimisation, though if the number of digits changes, all rows will still be renumbered. add_from should not be used if rows have been deleted.

set_columns_visible(columns_visible)[source]
set_status_percent(filepath, status_percent)[source]
update_column_levels()[source]

Pads the keys and values of our lists of column names so that they still match those in the dataframe after the number of levels in its multiindex has increased (the number of levels never decreases, given the current implementation of concat_with_padding())

update_row(filepath, dataframe_already_updated=False, new_row_data=None, updated_row_data=None)[source]

“Updates a row in the dataframe and Qt model to the data in the HDF5 file for that shot.