Force conversion

Python

Converts the ADC-digitized Vertical (A-B) signal to Force. The input parameters are calibration values obtained from SmartScan. Refer to the function docstring for the units of each parameter.

main 0 files
Force conversion..py
Force conversion..py 674 bytes
def calc_force(vertical, spring_constant, intensity_factor, sensitivity):
    """ Force Calculation
    Unit:
        vertical : V
        spring_constatnt : N/m
        error_stroke : um/V
        sensitivity: V/um
        intensity_factor : dimensionless
        force : nN
    Returns: force
    """
    eps = 7/3. - 4/3. -1
    spring_constant_newton_per_kilo_meter =  1e-3 * spring_constant # convert sping constant unit (N/km)
    error_stroke = 1e6 / sensitivity
    deflection_gain =  error_stroke / (intensity_factor + eps) # Deflection Gain (um/V)
    force = vertical * deflection_gain * spring_constant_newton_per_kilo_meter # nN
    return force
Comments (0)

No comments yet. Be the first to comment!

Snippet Information
Author: jungyu.lee
Language: Python
Created: Sep 15, 2026
Updated: 0 minutes ago
Views: 8
Stars: 0