pwem.viewers.mdviewer.sqlite_dao module

class pwem.viewers.mdviewer.sqlite_dao.ScipionColumn(name, renderer=None, callback=None)[source]

Bases: Column

calculate(row, values)[source]
setCallback(callback)[source]

Callback to compute the value for this column. The callback will receives the row

class pwem.viewers.mdviewer.sqlite_dao.ScipionSetsDAO(sqliteFile)[source]

Bases: IDAO

Class to serve data from scipion sets files (sqlite).

addChimera(renderer: ImageRenderer, imageExt: str)[source]
addExternalProgram(renderer: ImageRenderer, imageExt: str)[source]
addImageJ(renderer: ImageRenderer)[source]
addImageViewer(renderer: ImageRenderer, imageExt: str)[source]
close()[source]
composeDataTables(tablesNames)[source]

This method is used to generate a dictionary with the principal tables mapping the dependencies with other tables

composeImageFilename(row, values)[source]
composeObjectType()[source]

Define the different objects types

composeTableAlias(tableName)[source]

Create an alias for the given table

createSubsetCallback(table: Table, objectType: str, objectManager)[source]

Create a subset

exctractAngularValue(values, offset, position)[source]

Extract the euler angle form the matrix

exctractShift(values, offset, position)[source]

Extract offset value

fillPage(page, actualColumn: str, orderAsc=True)[source]

Read the given table from the sqlite and fill the page(add rows)

fillTable(table: ScipionTable, objectManager)[source]

Create the table structure (columns) and set the table alias

generateTableActions(table, objectManager)[source]

Generate actions for a given table in order to create subsets

getColumnsValues(tableName, columns, xAxis, selection, limit, useSelection, reverse=True)[source]

Get the values of the selected columns in order to plot them

classmethod getCompatibleFileTypes()[source]

Return a list of compatible extension of files

getRowsCount(tableName)[source]

Return the number of elements in the given table.

getScipionObjectId()[source]

Returns Scipion object id

getScipionPort()[source]

Returns Scipion port or None if not in the environment

getSelectedRangeRowsIds(tableName, startRow, numberOfRows, column, reverse=True)[source]

Return a range of rows starting at ‘startRow’ an amount of ‘numberOfRows’

getTableRow(tableName, rowIndex, **kwargs)[source]

Get a given row by index. Extra args are passed to iterTable.

getTableRowCount(tableName)[source]
getTableWithAdditionalInfo()[source]

Return a tuple with the table that need to show additional info and the column that we need to show

getTables()[source]

Return all the table names found in the database.

iterTable(tableName, **kwargs)[source]

Method to iterate over the table’s rows :param tableName: the name of the table :param kwargs:

limit: integer value to limit the number of elements start: start from a given element classes: read column names from a ‘classes’ table orderBy: clause to sort given a column name mode: sort direction ASC or DESC

sendSubsetCreationMessage(selectionFile, outputClassName, label)[source]
writeSelection(table: Table, path)[source]

Create a file with the selected rows ids

class pwem.viewers.mdviewer.sqlite_dao.ScipionTable(name, definitionTable)[source]

Bases: Table

getDefinitionTable()[source]