Code

Current Auto offset update

make the current offset adjustment as a function. by using for loop, removed unnecessary lines.

AutoCurrentOffset(Gain Value) //Gain Value = 6 or 9, internal only …
Force conversion

Converts the ADC-digitized Vertical (A-B) signal to Force. The input parameters are calibration values obtained …

def calc_force(vertical, spring_constant, intensity_factor, sensitivity): """ Force Calculation Unit: vertical …
PspptReader

This is an example of reading a PS-PPT file and plotting a force image. An …

import pspylib.ppt.tools as Tools import pspylib.ppt.defines as Defines from pspylib.ppt.reader …
Data Augmentation (Height Distortion: Fluctuation)

It is expected that the data can be used for augmentation in neural network training.

import numpy as np def _slinedata(np_array): """ Used when sum …
Data Augmentation (Height Distortion: Tip Damage)

It is expected that the data can be used for augmentation in neural network training.

import numpy as np def _slinedata(np_array): """ Used when sum …
Data Augmentation (Height Distortion: Sample Slope)

It is expected that the data can be used for augmentation in neural network training.

import numpy as np def _mlinedata(np_array): """ Used when mulitply …
Newton Method

A Classical root-finding method using derivative-based iterative approximation.

var $ = { "params": { "target": 10, "x0": 1, …
Secant Method

A Classical root-finding method using secant approximation without explicit derivatives.

var $ = { "params": { "target": 10, "x0": 0, …
Bisection Method

A classical numerical root-finding method based on bisection, with a maximum search complexity of O(logN).

var $ = { "params": { "target": 10, "left": 0, …
Async Scan Example

The example code performs the following operations: During the image scan, it adjusts the Tip …

var $AsyncScan = { "parameters" : { "channels" : ["ZHeight", …
Set the KPFM Parameters (w/ phase tuning)

How to set the KPFM Parameters (w/ phase tuning)

// Set sample bias //spm.bias.sample.value = 2; // Disabled the …
Set the Lift mode

This code can be used when operating in Lift mode.

var p = spm.scan.liftMode; // Get Lift mode configuration p.use …
Set the I/V parameters code

This is the code used to set the parameters configured during the I/V curve measurement.

var params = { bias:{ //bias settings "isReversed": true, //true= …
Set F/d Curve parameters

This is the code used to set the parameters configured during the F/d curve measurement.

var params = { "highestPos": 1, "lowestPos": -0.2, "useAutoOffset": true, …
Set Current Amp.

This code can be used when a current amplifier setting is required while using the …

//DC or AC var params = { "id": "park.nx.linear.dc", // …
Programming Languages