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

define_parameters_and_their_properties()[source]
define_program_states()[source]
set_integration_width(feature_set)[source]
set_topleft_coordinates(feature_set)[source]
set_topright_coordinates(feature_set)[source]
set_bottomleft_coordinates(feature_set)[source]
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

  1. Usage: ScanDotFit(pardict)

  2. 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

  1. Usage: slope, intercept = pttoline(ptone, pttwo)

  2. Input: ptone = tuple of x,y coordinates, pttwo = tuple of x,y coordinates

  3. 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

  1. Usage: dotx, doty = (boxwidth, topleft, topright, bottomleft, stepsize)

  2. Input: boxwidth width of integration, topleft/topright/bottomleft coordinate pair

  3. 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

  1. Usage: distances = dotdistance(dots, stepsize, no_cols, no_rows)

  2. Input: dots = list of X and Y coordinates of dots, scanner stepsize, number of columns, number of rows

  3. 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

  1. Usage: plot = vismic(nx, ny, subplot)

  2. Input: nx = number of rows, ny = number of columns, subplot = idendity of subplot

  3. Output: subplot to be returned

visdots(dots=None, horidots=None, vertdots=None)[source]
  • Function to visualize detected dots using matplotlib

  1. Usage: output = visfit(dots, horidots, vertdots)

  2. Input: dots = list of X and Y coordinates of dots, horidots, vertdots = list of distances

  3. Output: output plot to saved to PDF, PNG format

perform_scandotfit()[source]
scandotfit.main()[source]