BGlib.be.analysis.BELoopFitter

class BGlib.be.analysis.BELoopFitter(h5_main, be_data_type, vs_mode, vs_cycle_frac, **kwargs)[source]

A class that fits Simple Harmonic Oscillator model data to a 9-parameter model to describe hysteretic switching in ferroelectric materials

Notes

Quantitative mapping of switching behavior in piezoresponse force microscopy, Stephen Jesse, Ho Nyung Lee, and Sergei V. Kalinin, Review of Scientific Instruments 77, 073702 (2006); doi: http://dx.doi.org/10.1063/1.2214699

Parameters:
  • h5_main (h5py.Dataset) – The dataset over which the analysis will be performed. This dataset should be linked to the spectroscopic indices and values, and position indices and values datasets.

  • data_type (str) – Type of data. This is an attribute written to the HDF5 file at the root level by either the translator or the acquisition software. Accepted values are: ‘BEPSData’ and ‘cKPFMData’ Default - this function will attempt to extract this metadata from the HDF5 file

  • vs_mode (str) –

    Type of measurement. Accepted values are:

    ’AC modulation mode with time reversal’ or ‘DC modulation mode’ This is an attribute embedded under the “Measurement” group with the following key: ‘VS_mode’. Default - this function will attempt to extract this metadata from the HDF5 file

  • vs_cycle_frac (str) – Fraction of the bi-polar triangle waveform for voltage spectroscopy used in this experiment

  • h5_target_group (h5py.Group, optional. Default = None) – Location where to look for existing results and to place newly computed results. Use this kwarg if the results need to be written to a different HDF5 file. By default, this value is set to the parent group containing h5_main

  • kwargs (passed onto pyUSID.Process) –

__init__(h5_main, be_data_type, vs_mode, vs_cycle_frac, **kwargs)[source]
Parameters:
  • h5_main (h5py.Dataset) – The dataset over which the analysis will be performed. This dataset should be linked to the spectroscopic indices and values, and position indices and values datasets.

  • data_type (str) – Type of data. This is an attribute written to the HDF5 file at the root level by either the translator or the acquisition software. Accepted values are: ‘BEPSData’ and ‘cKPFMData’ Default - this function will attempt to extract this metadata from the HDF5 file

  • vs_mode (str) –

    Type of measurement. Accepted values are:

    ’AC modulation mode with time reversal’ or ‘DC modulation mode’ This is an attribute embedded under the “Measurement” group with the following key: ‘VS_mode’. Default - this function will attempt to extract this metadata from the HDF5 file

  • vs_cycle_frac (str) – Fraction of the bi-polar triangle waveform for voltage spectroscopy used in this experiment

  • h5_target_group (h5py.Group, optional. Default = None) – Location where to look for existing results and to place newly computed results. Use this kwarg if the results need to be written to a different HDF5 file. By default, this value is set to the parent group containing h5_main

  • kwargs (passed onto pyUSID.Process) –

Methods

__init__(h5_main, be_data_type, vs_mode, ...)

param h5_main:

The dataset over which the analysis will be performed. This dataset

compute([override])

Creates placeholders for the results, applies the _unit_computation() to chunks of the dataset

do_fit([override])

Computes the Fit

do_guess(*args[, override])

Computes the Guess

extract_loop_parameters(h5_loop_fit[, ...])

Method to extract a set of physical loop parameters from a dataset of fit parameters :param h5_loop_fit: Dataset of loop fit parameters :type h5_loop_fit: h5py.Dataset :param nuc_threshold: Nucleation threshold to use in calculation physical parameters :type nuc_threshold: float

set_up_fit([h5_partial_fit, h5_guess])

Performs necessary book-keeping before do_fit can be called.

set_up_guess([h5_partial_guess])

Performs necessary book-keeping before do_guess can be called.

test(**kwargs)

Tests the process on a subset (for example a pixel) of the whole data.

use_partial_computation([h5_partial_group])

Extracts the necessary parameters from the provided h5 group to resume computation

Attributes

parms_dict

The name of the HDF5 dataset that should be present to signify which positions have already been computed This is NOT a fully private variable so that multiple processes can be run within a single group - Eg Fitter In the case of Fitter - this name can be changed from 'completed_guesses' to 'completed_fits' check_for_duplicates will be called by the Child class where they have the opportunity to change this variable before checking for duplicates