Tools

ToolBounds

Module ToolBounds

Remove data ouside Bounds

class RepTate.tools.ToolBounds.BaseToolBounds(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Bounds function limits the data shown in the view

citations = []
toolname = 'Bounds'
class RepTate.tools.ToolBounds.CLToolBounds(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolBounds.BaseToolBounds, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolBounds.GUIToolBounds(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolBounds.BaseToolBounds, RepTate.gui.QTool.QTool

GUI Version

set_param_value(name, value)[source]

Set the value of a parameter of the tool

class RepTate.tools.ToolBounds.ToolBounds(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Remove points in the current view ïf \(x \notin [x_{min}, x_{max}]\) or \(y \notin [y_{min}, y_{max}]\)

citations = []
description = 'Bounds Tool'
toolname = 'Bounds'

ToolEvaluate

Module ToolEvaluate

Evaluate algebraic expressions in the current view

class RepTate.tools.ToolEvaluate.BaseToolEvaluate(name='', parent_app=None)[source]

Bases: object

Base Class for Evaluation of expressions

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Evaluate function that returns the square of the y, according to the view

citations = []
toolname = 'Eval Exp'
class RepTate.tools.ToolEvaluate.CLToolEvaluate(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolEvaluate.BaseToolEvaluate, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolEvaluate.GUIToolEvaluate(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolEvaluate.BaseToolEvaluate, RepTate.gui.QTool.QTool

GUI Version

class RepTate.tools.ToolEvaluate.ToolEvaluate(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Create new abcissa and ordinate data by evaluating an expression as a function of x and y (the abcissa and ordinate of the current view data). Standard algebraic expressions and mathematical functions (sin, cos, tan, arccos, arcsin, arctan, arctan2, deg2rad, rad2deg, sinh, cosh, tanh, arcsinh, arccosh, arctanh, around, round_, rint, floor, ceil, trunc, exp, log, log10, fabs, mod, e, pi, power, sqrt) are understood by the expression parser.

citations = []
description = 'Evaluate Expression Tool'
toolname = 'Eval Exp'

ToolFindPeaks

Module ToolFindPeaks

FindPeaks file for creating a new Tool

class RepTate.tools.ToolFindPeaks.BaseToolFindPeaks(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]
citations = []
clean_graphic_stuff()[source]
destructor()[source]

This is called when the Tool tab is closed

toolname = 'Find Peaks'
class RepTate.tools.ToolFindPeaks.CLToolFindPeaks(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolFindPeaks.BaseToolFindPeaks, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolFindPeaks.GUIToolFindPeaks(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolFindPeaks.BaseToolFindPeaks, RepTate.gui.QTool.QTool

GUI Version

handle_minpeaks_button(checked)[source]
handle_parabola_button(checked)[source]
class RepTate.tools.ToolFindPeaks.ToolFindPeaks(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Find peaks (maxima or minima) in the data, as represented by the current view. The option to find the maxima or the minima is specified by the min/max check button (the minpeaks parameter in the command line version). The threshold controls the relative height that a peak must have (with respect to the data span) in order to be detected. The minimum_distance parameter controls how far from each other the peaks must be in order to be distinguished. The returned peaks correspond to the maximum/minimum data point in the current view. Alternatively, the user can select to fit a parabola to the peaks and find the analytical maximum or minimum of the parabola. The parameter minimum_distance also controls the number of points around the maximum data point used to fit the parabola. The peaks are returned in the Tool information area and shown as symbols in the chart.

The algorithm used to find the peaks can be very inaccurate and slow if the data is noisy and has many local peaks. It is recommended to smooth the data first before finding the peaks.

citations = []
description = 'Find Peaks in current data/view'
toolname = 'Find Peaks'

ToolGradient

Module ToolGradient

Gradient file for creating a new Tool

class RepTate.tools.ToolGradient.BaseToolGradient(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]
citations = []
toolname = 'Gradient'
class RepTate.tools.ToolGradient.CLToolGradient(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolGradient.BaseToolGradient, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolGradient.GUIToolGradient(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolGradient.BaseToolGradient, RepTate.gui.QTool.QTool

GUI Version

class RepTate.tools.ToolGradient.ToolGradient(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Calculate the derivative of y with respect to x, where y is the ordinate and x is the abcissa in the current view. The gradient function from numpy is used, where the derivative is computed using second order accurate central differences in the interior points and first order accurate one-sides (forward or backwards) differences at the boundaries.

citations = []
description = 'Take derivative of current data/view'
toolname = 'Gradient'

ToolIntegral

Module ToolIntegral

Integral file for creating a new Tool

class RepTate.tools.ToolIntegral.BaseToolIntegral(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Integral function that returns the square of the y, according to the view

citations = []
toolname = 'Integral'
class RepTate.tools.ToolIntegral.CLToolIntegral(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolIntegral.BaseToolIntegral, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolIntegral.GUIToolIntegral(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolIntegral.BaseToolIntegral, RepTate.gui.QTool.QTool

GUI Version

class RepTate.tools.ToolIntegral.ToolIntegral(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Calculate the integral of y with respect to x, where y is the ordinate and x is the abcissa in the current view. Repeated points in the data are removed before the integral is performed. The data between the point is interpolated with a cubic spline. The total value of the definite integral is shown in the Tool output region. If a different integration interval is needed, the Bounds tool can be used before the Integral tool.

citations = []
description = 'Integral of current data/view'
toolname = 'Integral'

ToolInterpolate

Module InterpolateExtrapolate

Interpolate/Extrapolate data

class RepTate.tools.ToolInterpolate.BaseToolInterpolateExtrapolate(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

InterpolateExtrapolate function that returns the square of the y, according to the view

citations = []
toolname = 'Interpolate/Extrapolate'
class RepTate.tools.ToolInterpolate.CLToolInterpolateExtrapolate(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolInterpolate.BaseToolInterpolateExtrapolate, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolInterpolate.GUIToolInterpolateExtrapolate(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolInterpolate.BaseToolInterpolateExtrapolate, RepTate.gui.QTool.QTool

GUI Version

class RepTate.tools.ToolInterpolate.ToolInterpolateExtrapolate(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Interpolates data

citations = []
description = 'Interpolate/Extrapolate from view'
toolname = 'Interpolate/Extrapolate'

ToolMaterialsDatabase

Module ToolMaterialsDatabase

MaterialsDatabase Viewer

class RepTate.tools.ToolMaterialsDatabase.BaseToolMaterialsDatabase(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Calculate some results related to the selected material or the file material

calculate_all(n, x, y, ax=None, color=None, file_parameters=[])[source]

Calculate the tool for all views - In MatDB, only first view is needed

citations = []
do_calculate_stuff(line='')[source]

Given the values of Mw (in kDa) and T (in °C), as well as a flag for isofrictional state and vertical shift, it returns some calculations for the current chemistry. Example:

calculate_stuff 35.4 240 1 1

Mw=35.4 T=240 isofrictional=True verticalshift=True

toolname = 'Materials Database'
class RepTate.tools.ToolMaterialsDatabase.CLToolMaterialsDatabase(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolMaterialsDatabase.BaseToolMaterialsDatabase, RepTate.core.Tool.Tool

CL Version

complete_material(text, line, begidx, endidx)[source]
do_database(line)[source]

Print information about the location of the Material database files

do_material(line)[source]

Change/View the selected material

class RepTate.tools.ToolMaterialsDatabase.EditMaterialParametersDialog(parent, material, parameterdata)[source]

Bases: PyQt5.QtWidgets.QDialog

Create the form that is used to edit/modify the material parameters

createFormGroupBox(material, parameterdata)[source]

Create a form to set the new values of the material parameters

class RepTate.tools.ToolMaterialsDatabase.GUIToolMaterialsDatabase(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolMaterialsDatabase.BaseToolMaterialsDatabase, RepTate.gui.QTool.QTool

GUI Version

calculate_stuff(line='', file_parameters=[])[source]
change_material()[source]
copy_material()[source]
delete_material()[source]
edit_material()[source]
handle_shift_data()[source]
handle_vert_and_iso()[source]
new_material()[source]
save_usermaterials()[source]
class RepTate.tools.ToolMaterialsDatabase.ToolMaterialsDatabase(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

A special Tool to store the material parameters. Many apps and theories rely on the parameters stored in this database. There are two copies of the database: i) a general one that is distributed with RepTate, is stored in the software installation folder and contains well established values of the parameters and ii) a user database that contains material parameters introduced by the user and is stored in the user HOME folder.

citations = []
description = 'Materials Database Explorer'
toolname = 'Materials Database'
RepTate.tools.ToolMaterialsDatabase.check_chemistry(chem)[source]

Check if the file contains chemistry. If so, check if the chemistry appears in the user or general materials database.

Arguments:
  • chem {str} – Chemistry

Returns:
  • code {integer} – -1 (not found) 0 (found in user’s) 1 (found in general database)

RepTate.tools.ToolMaterialsDatabase.get_all_parameters(chem, theory, fparam, dbindex)[source]

Gets all possible parameters from the corresponding materials database. The function check_chemistry must be involed before this one, to get chem and dbindex.

Arguments:
  • chem {str} – Chemistry

  • theory {Theory} – A given theory

  • file_parameters {dict} – Parameters of the file

  • dbindex {int} – Index of the database to use (0 user, 1 general)

Returns:
  • nothing

RepTate.tools.ToolMaterialsDatabase.get_single_parameter(chem, param, fparam, dbindex)[source]

Returns the parameter ‘param’ of the chemistry ‘chem’ using the database given by dbindex (0 user, 1 general) and taking into account the parameters of fparam (for example, T and Mw). The parameter ‘param’ must exist in the database. This is done when this function is invoked from get_all_parameters. If this function is invoked directly, the condition must be chedked beforehand.

Arguments:
  • chem {str} – Chemistry

  • param – The theory parameter that we want to set

  • file_parameters {dict} – Parameters of the file

  • dbindex {int} – Index of the database to use (0 user, 1 general)

Returns:
  • value – The value of the parameter

  • success {bool} – A success flag

ToolPowerLaw

Module ToolPowerLaw

Tool to check the power law of some data

class RepTate.tools.ToolPowerLaw.BaseToolPowerLaw(name='', parent_app=None)[source]

Bases: object

Basic class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Returns y divided by x^n, according to the view

citations = []
destructor()[source]

If the tool needs to clear up memory in a very special way, fill up the contents of this function. If not, you can safely delete it.

toolname = 'PowerLaw'
class RepTate.tools.ToolPowerLaw.CLToolPowerLaw(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolPowerLaw.BaseToolPowerLaw, RepTate.core.Tool.Tool

CL version

class RepTate.tools.ToolPowerLaw.GUIToolPowerLaw(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolPowerLaw.BaseToolPowerLaw, RepTate.gui.QTool.QTool

GUI Version

class RepTate.tools.ToolPowerLaw.ToolPowerLaw(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Check the power law of the data (or some part of it) by dividing the y coordinate by the x coordinate raised to n.

citations = []
description = 'Check the power law of the data'
toolname = 'PowerLaw'

ToolSmooth

Module ToolSmooth

Smooth data by applying a Savitzky-Golay filter

class RepTate.tools.ToolSmooth.BaseToolSmooth(name='', parent_app=None)[source]

Bases: object

Base class for both GUI and CL

calculate(x, y, ax=None, color=None, file_parameters=[])[source]

Smooth the x, y data

citations = []
toolname = 'Smooth'
class RepTate.tools.ToolSmooth.CLToolSmooth(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolSmooth.BaseToolSmooth, RepTate.core.Tool.Tool

CL Version

class RepTate.tools.ToolSmooth.GUIToolSmooth(name='', parent_app=None)[source]

Bases: RepTate.tools.ToolSmooth.BaseToolSmooth, RepTate.gui.QTool.QTool

GUI Version

set_param_value(name, value)[source]

Set the value of a parameter of the tool

class RepTate.tools.ToolSmooth.ToolSmooth(name='', parent_app=None)[source]

Bases: RepTate.core.CmdBase.CmdBase

Smooths the current view data by applying a Savitzky-Golay filter. The smoothing procedure is controlled by means of two parameters: the window length (a positive, odd integer), which represents the number of convolution coefficients of the filter, and the order of the polynomial used to fit the samples (must be smaller than the window length).

citations = []
description = 'Smooth Tool'
toolname = 'Smooth'