CustomFunction

From SweepMe! Wiki
Revision as of 12:22, 2 July 2019 by Afischer (talk | contribs)
Jump to navigation Jump to search

The CustomFunction module is designed to allow users to load their own python function and hand over measurement values. The main purpose is to hand over measurement data from multiple modules to a function which takes care about calculating all necessary parameters and about data processing.

The position of the CustomFunction module in the Sequencer determines where the data which is handed over to the CustomFunction function is splitted.

Adding a new function

  1. Start SweepMe!
  2. Add a CustomFunction module to the sequencer
  3. Go to the tab of the CustomFunction module
  4. Press "+" and enter the name of the new Function
  5. You can modify your new function using 'Open/Modify'
  6. Your new function can be found in the public folder '.\Modules\CustomFunction\Functions'

Editing a Function

  • self.variables: set a list of strings defining the names of your output variables
  • self.units: set a list of strings defining the names of the units corresponding to self.variables
  • self.variables and self.units have to have the same length as the number of return values of your main-function
  • Input parameters: Define the names and the types of the input parameters according to the Function 'Example'
  • change the return values according to the definition of self.variables and self.units.

Input parameters

  • Data from SweepMe!: tuple -> ()
  • Integer: int -> any integer number which will be the preset value
  • Float: float -> any float value which will be the preset value
  • String: str -> any string which will be the preset value
  • List: list -> any list of strings which will be presented in ComboBox for selection by the user
  • Bool: bool -> set to True or False; the user can later select using a CheckBox
  • Path: pathlib.Path() -> an empty or non-empty pathlib.Path object. The user will see a QFileDialog to choose a file.


Applications

  • Data smoothing
  • Repetitive curve fitting and extraction of fit parameters
  • Parameter extraction
  • Specializing a measurement setup to certain needs
  • pre-evaluation of the data
  • using SweepMe! as a frontend for simulations

Examples

  • Characteriztion of field-effect transistors: Transfer characteristics are measured in the linear regime. Current and voltage measurement data is handed over to the Evaluation module where charge carrier mobility and threshold voltage is extracted.
  • Characterization of LEDs: Spectra and current-voltage characteristics can be handed over to the Evaluation module to calculate several device efficiency parameters.
  • Calculation of peak values, zeroing, derivation, integral, mean, standard deviation, ...