Tools¶
ToolBounds¶
Module ToolBounds
Remove data ouside Bounds
- class RepTate.tools.ToolBounds.ToolBounds(name='', parent_app=None)[source]
Bases:
QTool
Remove points in the current view ïf \(x \notin [x_{min}, x_{max}]\) or \(y \notin [y_{min}, y_{max}]\)
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
Bounds function limits the data shown in the view
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Bounds Tool'
description {str} – Description of Tool
- set_param_value(name, value)[source]
Set the value of a parameter of the tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolBounds" inherits "QTool": )
- toolname = 'Bounds'
toolname {str} – Tool name
ToolEvaluate¶
Module ToolEvaluate
Evaluate algebraic expressions in the current view
- class RepTate.tools.ToolEvaluate.ToolEvaluate(name='', parent_app=None)[source]
Bases:
QTool
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.- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
Evaluate function that returns the square of the y, according to the view
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Evaluate Expression Tool'
description {str} – Description of Tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolEvaluate" inherits "QTool": )
- toolname = 'Eval Exp'
toolname {str} – Tool name
ToolFindPeaks¶
Module ToolFindPeaks
FindPeaks file for creating a new Tool
- class RepTate.tools.ToolFindPeaks.ToolFindPeaks(name='', parent_app=None)[source]
Bases:
QTool
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.
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
- citations = []
citations {list of str} – Articles that should be cited
- clean_graphic_stuff()[source]
- description = 'Find Peaks in current data/view'
description {str} – Description of Tool
- destructor()[source]
This is called when the Tool tab is closed
- handle_minpeaks_button(checked)[source]
- handle_parabola_button(checked)[source]
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolFindPeaks" inherits "QTool": )
- toolname = 'Find Peaks'
toolname {str} – Tool name
ToolGradient¶
Module ToolGradient
Gradient file for creating a new Tool
- class RepTate.tools.ToolGradient.ToolGradient(name='', parent_app=None)[source]
Bases:
QTool
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.
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Take derivative of current data/view'
description {str} – Description of Tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolGradient" inherits "QTool": )
- toolname = 'Gradient'
toolname {str} – Tool name
ToolIntegral¶
Module ToolIntegral
Integral file for creating a new Tool
- class RepTate.tools.ToolIntegral.ToolIntegral(name='', parent_app=None)[source]
Bases:
QTool
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.
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
Integral function that returns the square of the y, according to the view
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Integral of current data/view'
description {str} – Description of Tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolIntegral" inherits "QTool": )
- toolname = 'Integral'
toolname {str} – Tool name
ToolInterpolate¶
Module InterpolateExtrapolate
Interpolate/Extrapolate data
- class RepTate.tools.ToolInterpolate.ToolInterpolateExtrapolate(name='', parent_app=None)[source]
Bases:
QTool
Interpolates data
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
InterpolateExtrapolate function that returns the square of the y, according to the view
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Interpolate/Extrapolate from view'
description {str} – Description of Tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolInterpolateExtrapolate" inherits "QTool": )
- toolname = 'Interpolate/Extrapolate'
toolname {str} – Tool name
ToolMaterialsDatabase¶
Module ToolMaterialsDatabase
MaterialsDatabase Viewer
- class RepTate.tools.ToolMaterialsDatabase.EditMaterialParametersDialog(parent, material, parameterdata)[source]
Bases:
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
- staticMetaObject = PySide6.QtCore.QMetaObject("EditMaterialParametersDialog" inherits "QDialog": )
- class RepTate.tools.ToolMaterialsDatabase.ToolMaterialsDatabase(name='', parent_app=None)[source]
Bases:
QTool
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.
- 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
- calculate_stuff(line='', file_parameters=[])[source]
- change_material()[source]
- citations = []
citations {list of str} – Articles that should be cited
- copy_material()[source]
- delete_material()[source]
- description = 'Materials Database Explorer'
description {str} – Description of Tool
- 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
- edit_material()[source]
- handle_shift_data()[source]
- handle_vert_and_iso()[source]
- new_material()[source]
- save_usermaterials()[source]
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolMaterialsDatabase" inherits "QTool": )
- toolname = 'Materials Database'
toolname {str} – Tool name
- 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.
- Parameters:
chem (str) – Chemistry
- Returns:
code -1 (not found) 0 (found in user’s) 1 (found in general database)
- Return type:
int
- 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.ToolPowerLaw(name='', parent_app=None)[source]
Bases:
QTool
Check the power law of the data (or some part of it) by dividing the y coordinate by the x coordinate raised to n.
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
Returns y divided by x^n, according to the view
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Check the power law of the data'
description {str} – Description of Tool
- 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.
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolPowerLaw" inherits "QTool": )
- toolname = 'PowerLaw'
toolname {str} – Tool name
ToolSmooth¶
Module ToolSmooth
Smooth data by applying a Savitzky-Golay filter
- class RepTate.tools.ToolSmooth.ToolSmooth(name='', parent_app=None)[source]
Bases:
QTool
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).
- calculate(x, y, ax=None, color=None, file_parameters=[])[source]
Smooth the x, y data
- citations = []
citations {list of str} – Articles that should be cited
- description = 'Smooth Tool'
description {str} – Description of Tool
- set_param_value(name, value)[source]
Set the value of a parameter of the tool
- staticMetaObject = PySide6.QtCore.QMetaObject("ToolSmooth" inherits "QTool": )
- toolname = 'Smooth'
toolname {str} – Tool name