Documented functions with links to source¶
Program to evaluate performance of scanner by measuring dots spaced 2.5 mm apart.
-
class
scandotfit.
ScanDotFitPar
[source]¶ Class to initiate default dictionary with input parameters including help and range values and status dictionary
Methods
define_parameters_and_their_properties
define_program_states
set_bottomleft_coordinates
set_integration_width
set_topleft_coordinates
set_topright_coordinates
-
class
scandotfit.
ScanDotFit
(parset=None)[source]¶ Class that holds functions for automated distance measurements from regular dots on micrograph
__init__ Function to read in the entered parameter dictionary and load micrograph
Usage: ScanDotFit(pardict)
Input: pardict = OrderedDict of program parameters
Methods
dotdistance
([dots, stepsize, no_cols, no_rows])Function to determine distances between adjacent dots
pttoline
([ptone, pttwo])Function that determines line equation from two given points
searchdots
([boxwidth, topleft, topright, …])Function to determine coordinates of dots by center of gravity measurements
visdots
([dots, horidots, vertdots])Function to visualize detected dots using matplotlib
vismic
(nx, ny, subplot)Function to prepare a micrograph in row and column dimension for matplotlib
perform_scandotfit
-
pttoline
(ptone=None, pttwo=None)[source]¶ Function that determines line equation from two given points
Usage: slope, intercept = pttoline(ptone, pttwo)
Input: ptone = tuple of x,y coordinates, pttwo = tuple of x,y coordinates
Output: slope, intercept
-
searchdots
(boxwidth=None, topleft=None, topright=None, bottomleft=None, stepsize=None)[source]¶ Function to determine coordinates of dots by center of gravity measurements
Usage: dotx, doty = (boxwidth, topleft, topright, bottomleft, stepsize)
Input: boxwidth width of integration, topleft/topright/bottomleft coordinate pair
Output: dotx and doty = list of X and Y coordinates of dots
-
dotdistance
(dots=None, stepsize=None, no_cols=None, no_rows=None)[source]¶ Function to determine distances between adjacent dots
Usage: distances = dotdistance(dots, stepsize, no_cols, no_rows)
Input: dots = list of X and Y coordinates of dots, scanner stepsize, number of columns, number of rows
Output: list of horizontal and vertical distances from adjacent dots
-
vismic
(nx, ny, subplot)[source]¶ Function to prepare a micrograph in row and column dimension for matplotlib
Usage: plot = vismic(nx, ny, subplot)
Input: nx = number of rows, ny = number of columns, subplot = idendity of subplot
Output: subplot to be returned