Start NCM Sweep
Python
Code that performs an NCM Sweep
main
1 file
Start NCM Sweep..py
ncm_sweep.py
1.0 KB
Start NCM Sweep..py
1073 bytes
from SmartRemote import SmartRemote
class NCMSweep:
def __init__(self, SR:SmartRemote):
self.__sr = SR
def ncm_sweep_auto(self, target_amp:float=25.0, start_freq:float=10.0, \
end_freq:float=1000, init_drive:float=9.0):
"""Starts ncm sweep with auto options
Args:
target_amp (float): Target amplitude (nm)
start_freq (float): The start value of the initial frequency range (Hz)
end_freq (float): The last value of the initial frequency range (Hz)
init_drive (float): The drive strength (%)
"""
reply = self.__sr.run(f'spm.ncm.sweepAuto({target_amp}, {start_freq}, {end_freq}, {init_drive})')
return reply
def ncm_sweep_auto_full_range(self):
"""Starts ncm sweep on full_range """
reply = self.__sr.run('spm.ncm.sweepAutoFullRange()')
return reply
if __name__ == "__main__":
sr = SmartRemote()
ncm_sweep = NCMSweep(sr)
reply = ncm_sweep.ncm_sweep_auto_full_range()
Comments (0)
No comments yet. Be the first to comment!