Package: nanosurf
Nanosurf Python library and application packageThe Nanosurf Python package contains classes and functions for the following topics:Remote control of Nanosurf Studio and classic Nanosurf Atomic force microscopesThe package contains a large number of general functions for data analysisPowerful QUI Framework to create nice graphical application based on QTMultiple demo applicationsPrerequisitesPython 3.9, 3.10 or 3.11 installed on Windows OS.Python 3.12 is not yet supported due to the used lupa package.Nanosurf Studio or any classic Nanosurf controller software with 'Scripting Interface' option activatedMaxOS and Linux can use the library for off-line analysisInstallation and upgradingTo install the package, open a Windows Command Prompt and run:pipinstallnanosurfTo upgrade your nanosurf package to the newest version,
open Windows Command Prompt and run:pipinstallnanosurf-URunning the examplesWe suggest to use Visual Studio Code as your IDE to run, write and debug your Python code.
Install the python extension for Visual Studio Code.In the library, Nanosurf provides a documentation, some script demos and full fledged application templates to give you a quick start.
They are in the nanosurf package sub folders "app" and "doc". But where are they on your system?
Depending on the exact installation of python, the package folders can be at very different places.Therefore, the nanosurf package provides a command shell script to help you:
Open Windows Command Prompt and type:nanosurf_helpIf this shell script does not run you can do it manually.
Open Windows Command Prompt and type:python>>>importnanosurf>>>nanosurf.help()The output of this command print the exact path to the app and doc folder.
Use one of path to open the example scripts in Visual Studio Code (or any other python IDE) and run them.AFM Software Programmers ManualThe classic Nanosurf AFM Control Software has a own programmers manual and can be found in the Scripting Manual
in Nanosurf controller software under Help tab:
Help -> Manuals -> Script Programmers Manual, orhere.Unfortunately the Nanosurf Studio application do net yet have its onw programmers manual. But we are working hard to provide this soon.Library Version Historyv1.8.6Bugfix: Class AccessoryInterface did not work after update for Studio i2c supportAdd option 'log_amp' to plot.plot_bode()v1.8.5Bugfix: Reloading of new Studio wrapper classes in first run did not workBugfix: sci_math.compress_spectrum() keep channel name intactAdd option 'log_y' to plot.plot_spectrum()v1.8.4Bugfix: add missing lupa files for pyinstallerNew: add I2C-Devices: MCP45XX, MAX1161x and MMA8451v1.8.3Bugfix: data scaling for channels without calibration factorsv1.8.2New intro page for PyPiv1.8.1fix python version requirement checkv1.8.0prevent installation with python 3.12 due to incompatible lupa packageadd I2C class support for Studionanosurf.app/demo_wave_mode_nma_analysis: added Hertz modelv1.7.2New: nanosurf.app/demo_wave_mode_nma_analysis: more options for file dialogv1.7.1Bugfix: Image Points/lines where swapped on gwy_exportv1.7.0New: nanosurf.app/demo_wave_mode_nma_analysis: script which calculates max_force, adhesion and stiffnessNew: nanosurf.lib.util.nhf_reader: Studio measurement files (*.nhf) readerNew: nanosurf.lib.util.nid_reader: Classic measurement files (*.nid) readerNew: nanosurf.lib.util.gwy_export: Gwyddion data file creator/exporterNew: nanosurf.app/py_installer_template: makes creating *.exe from python apps simplev1.6.2New: qt_app_framwork supports multi screen modulesBugfix: settings should not be of dataclass typev1.6.1Bugfix: pip packaging did not copy framework filesv1.6.0New: spm_template: A new template to demonstrate simple connection to CX/Studio and measure some dataNew: app_DriveAFM_Tip_Current_Addon this app controls the amplifier of the Tip-Current AddonNew: demo_move_sample_stage. This demo shows basic stage movementsNew: demo_lateral_force_signal_calibration. This demo shows how to calibrate the lateral force signalNew: nanosurf.plot. A package to easily plot data array from lists, numpy array, SciChannel and SciStreamNew: nanosurf.spm.lowlevel.DataSamplerAccess. A class to make data sampling easier for CX/StudioNew: nanosurf.frameworks.qt_app: A framework to easily create nice Qt applicationsUpdate: all applications are using the new qt_app framework of the libraryUpdate: app_frequency_sweep: add logarithmic plotting capabilityBugfix: app_frequency_sweep: excitation mode was invertedv1.5.1Bugfix: Do not convert Lua arrays with string-keysBugfix: Improved Python enum conversion to Luav1.5.0Library supports now python v3.11Library supports now PySide2 and PySide6v1.4.1bugfix: Studio vector attributes are defined as .vector instead of .valueimprove installation instruction for editable modev1.4.0Add enum support for Nanosurf Studio scripting interfaceNanosurf Studio properties and LogicalUnits attributes have common interface styleAdd revers ramp feature to App_Switching_SpectroscopySome small improvements to other applicationsv1.3.4fix bug in frequency_sweepv1.3.3Improve visual appearance of some nsf.gui elementsfix eeprom memory write access for i2c.chip_24LC34Abetter return value for fileutil.create_unique_folder() in case of errorv1.3.2Bugfix: Studio - handling of boolean properties was not workingAdd support for DriveAFM Camera i2c-chipv1.3.1Bugfix: App_switching_spectroscopy - selection of output and amplitude setting had some issuesv1.3.0Add simplifies library usage is possible. Just write 'import nanosurf as nsf' and full access to sub-libraries is provided in visual studio codenew app: app_switching_spectroscopy provides the possibility to measure in "Switching Spectroscopy"-Modenew qui elements: nsf.gui.NSFEdit and nsf.gui.NSFComboBoxBugfix: Wrong number type in Python for double based propertyBugfix: nsf.spm.workflow.frequency_sweep: PositionX/Y/Z was not working as outputv1.2.0Add Studio scripting supportv1.1.0Add direct I2C motor controlv1.0.0Initial releaseLicenseMIT License