nanosurf


Namenanosurf JSON
Version 1.12.3 PyPI version JSON
download
home_pageNone
SummaryPython API for Nanosurf controllers and Nanosurf style application framework
upload_time2025-07-16 13:29:00
maintainerNone
docs_urlNone
authorNanosurf AG
requires_python<3.14,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nanosurf Python library and application package

The Nanosurf Python package contains classes and functions for the following topics:

* Remote control of Nanosurf Studio and classic Nanosurf Atomic-Force-Microscopes
* A large number of general functions for data analysis
* Application Framework to create powerful graphical applications based on QT
* MacOS and Linux platform can use the library for off-line analysis
* Multiple demo applications

## Prerequisites

* Python 3.9 up to 3.12 installed on Windows OS. Get the installation from 'python.org'
* Nanosurf Studio or any classic Nanosurf controller software with 'Scripting Interface' option activated

## Installation and upgrading

To install the package, open a Windows Command Prompt and run:

```shell
pip install nanosurf
```

To upgrade your nanosurf package to the newest version,
open Windows Command Prompt and run:

```shell
pip install nanosurf -U
```

## Running the examples

In the library, Nanosurf provides a documentation, demo scripts, applications for some hardware addons and 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.
Open Windows Command Prompt and type:

```python
python 
>>> import nanosurf
>>> nanosurf.help()
```

The output of this command print the exact path to the app and doc folder.

We suggest to use Visual Studio Code as your IDE to run, write and debug your Python code.
Use one of path to open the example scripts

## AFM Software Programmers Manual

The 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

Unfortunately the Nanosurf Studio application do not yet have its own programmers manual. But we are working hard to provide this.

## Library Version History

* v1.12.3
  * Bugfix: nhf_reader: Again, dataset conversion to some units with segment.read_channel() could go wrong

* v1.12.2
  * Bugfix: installation dependency for PyQtGraph package. Currently it only works with PySide6 version <=6.9.0
  * Bugfix: nhf_reader: list of available units with dataset.units() where not always complete 
  * Bugfix: nhf_reader: Dataset conversion to some units with segment.read_channel() could sometimes not be resolved
  * Bugfix: some devices where not enabled with platform Linux
  * Update: improved versions of device drivers form TMP117/119 and SHT45
  * Update: Some improvement in I2C bus access in Nanosurf_Linux
  * New: Add support for GSSClimateSensor device

* v1.12.1
  * Bugfix: nsf_sci_edit and nsf_edit value changed registration was wrong
  * Update: studio code wrapper supports now UTF-8 strings
  * Update: Support for embedded Nanosurf_Linux without GUI
  * Update: How to install on Linux (RaspberryOS, ore others)
  * New: I2C classes for TMP119 and SHT4x chips


* v1.12.0
  * Update: nhf_reader supports v2.x files
  * New: I2C BusMaster support on Linux platform

* v1.11.0
  * Update: nhf_reader supports multiple calibrations stored in file
  * Update: nhf_reader supports data sets with NaN-Values (not-an-number) and not measured points
  * Update: nhf_reader has its own documentation in doc folder
  * New: Application for "VMF Sample Holder 2"

* v1.10.1
  * Update: Spectroscopy analysis scripts has improved fit ranges
  * Bugfix: Studio access to I2C-Bus failed
  * Bugfix: nhf_reader did not handle datasets with NaN values
  * Bugfix: nhf_reader converted small integer data ranges incorrect

* v1.10.0
  * Python 3.13 support
  * update spm_template: support of continuos measurement, input/output channels and fixation of y-range
  * Bugfix: qt_framework was not shutting down modules properly and did not store last settings

* v1.9.5
  * Bugfix: studio wrapper generator was not python 3.12 compatible
  * Limit installation of nanosurf library from 3.9 up to 3.12.

* v1.9.4
  * Bugfix: nhf_reader.read_channel() could not be call multiple times correctly
  * Bugfix: nhf_reader.read_channel() channel with "int"-unit have now np.int32

* v1.9.3
  * updated NHFFileReader class supports nhf-files version 2.1
  * Bugfix: Change list of shown items in NSFComboBox during runtime failed

* v1.9.2
  * Update installation requirements to fulfill numpy 2.0 minimal library version
  * Bugfix: Change list of shown items in NSFComboBox during runtime failed

* v1.9.1
  * Bugfix: AccessoryInterface class did not handle port-switching and slave-id readout properly
  * Bugfix: AppFramework: Module without screen could not be initialized properly

* v1.9.0
  * Python 3.12 support
  * New: Spectroscopy analysis scripts with contact mechanics models
  * New: Control app for the DriveAFM TipAccess Addon
  * New: Control app for the DriveAFM TipCurrent Addon
  * New: Platform support for Linux and Mac: installation and usage of post processing functions are possible
  * updated NHFFileReader class supports now nhf-files version 2
  * updated pyinstaller template supports now scipy import in exe
  * updated documentation with installation guide, library overview and GUI-App programming

* v1.8.6
  * Bugfix: Class AccessoryInterface did not work after update for Studio i2c support
  * Add option 'log_amp' to plot.plot_bode()

* v1.8.5
  * Bugfix: Reloading of new Studio wrapper classes in first run did not work
  * Bugfix: sci_math.compress_spectrum() keep channel name intact
  * Add option 'log_y' to plot.plot_spectrum()
  
* v1.8.4
  * Bugfix: add missing lupa files for pyinstaller
  * New: add I2C-Devices: MCP45XX, MAX1161x and MMA8451

* v1.8.3
  * Bugfix: data scaling for channels without calibration factors

* v1.8.2
  * New intro page for PyPi

* v1.8.1
  * fix python version requirement check

* v1.8.0
  * prevent installation with python 3.12 due to incompatible lupa package
  * add I2C class support for Studio
  * nanosurf.app/demo_wave_mode_nma_analysis: added Hertz model

* v1.7.2
  * New: nanosurf.app/demo_wave_mode_nma_analysis: more options for file dialog

* v1.7.1
  * Bugfix: Image Points/lines where swapped on gwy_export

* v1.7.0
  * New: nanosurf.app/demo_wave_mode_nma_analysis: script which calculates max_force, adhesion and stiffness
  * New: nanosurf.lib.util.nhf_reader: Studio measurement files (*.nhf) reader
  * New: nanosurf.lib.util.nid_reader: Classic measurement files (*.nid) reader
  * New: nanosurf.lib.util.gwy_export: Gwyddion data file creator/exporter
  * New: nanosurf.app/py_installer_template: makes creating *.exe from python apps simple
  
* v1.6.2
  * New: qt_app_framwork supports multi screen modules
  * Bugfix: settings should not be of dataclass type

* v1.6.1
  * Bugfix: pip packaging did not copy framework files

* v1.6.0
  * New: spm_template: A new template to demonstrate simple connection to CX/Studio and measure some data
  * New: app_DriveAFM_Tip_Current_Addon this app controls the amplifier of the Tip-Current Addon
  * New: demo_move_sample_stage. This demo shows basic stage movements
  * New: demo_lateral_force_signal_calibration. This demo shows how to calibrate the lateral force signal
  * New: nanosurf.plot. A package to easily plot data array from lists, numpy array, SciChannel and SciStream
  * New: nanosurf.spm.lowlevel.DataSamplerAccess. A class to make data sampling easier for CX/Studio
  * New: nanosurf.frameworks.qt_app: A framework to easily create nice Qt applications
  * Update: all applications are using the new qt_app framework of the library
  * Update: app_frequency_sweep: add logarithmic plotting capability
  * Bugfix: app_frequency_sweep: excitation mode was inverted

* v1.5.1
  * Bugfix: Do not convert Lua arrays with string-keys
  * Bugfix: Improved Python enum conversion to Lua

* v1.5.0
  * Library supports now python v3.11
  * Library supports now PySide2 and PySide6

* v1.4.1
  * bugfix: Studio vector attributes are defined as .vector instead of .value
  * improve installation instruction for editable mode

* v1.4.0
  * Add enum support for Nanosurf Studio scripting interface
  * Nanosurf Studio properties and LogicalUnits attributes have common interface style
  * Add revers ramp feature to App_Switching_Spectroscopy
  * Some small improvements to other applications

* v1.3.4
  * fix bug in frequency_sweep

* v1.3.3
  * Improve visual appearance of some nsf.gui elements
  * fix eeprom memory write access for i2c.chip_24LC34A
  * better return value for fileutil.create_unique_folder() in case of error

* v1.3.2
  * Bugfix: Studio - handling of boolean properties was not working
  * Add support for DriveAFM Camera i2c-chip

* v1.3.1
  * Bugfix: App_switching_spectroscopy - selection of output and amplitude setting had some issues

* v1.3.0
  * Add simplifies library usage is possible. Just write 'import nanosurf as nsf' and full access to sub-libraries is provided in visual studio code
  * new app: app_switching_spectroscopy provides the possibility to measure in "Switching Spectroscopy"-Mode
  * new qui elements: nsf.gui.NSFEdit and nsf.gui.NSFComboBox
  * Bugfix: Wrong number type in Python for double based property   
  * Bugfix: nsf.spm.workflow.frequency_sweep: PositionX/Y/Z was not working as output

* v1.2.0
  * Add Studio scripting support

* v1.1.0
  * Add direct I2C motor control

* v1.0.0
  * Initial release

### License

[MIT License](https://en.wikipedia.org/wiki/MIT_License)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nanosurf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nanosurf AG",
    "author_email": "scripting@nanosurf.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/e1/50d4bdb11def009191cab0b5c567736af14b0ba863c08285b7845427ba5c/nanosurf-1.12.3.tar.gz",
    "platform": null,
    "description": "# Nanosurf Python library and application package\r\n\r\nThe Nanosurf Python package contains classes and functions for the following topics:\r\n\r\n* Remote control of Nanosurf Studio and classic Nanosurf Atomic-Force-Microscopes\r\n* A large number of general functions for data analysis\r\n* Application Framework to create powerful graphical applications based on QT\r\n* MacOS and Linux platform can use the library for off-line analysis\r\n* Multiple demo applications\r\n\r\n## Prerequisites\r\n\r\n* Python 3.9 up to 3.12 installed on Windows OS. Get the installation from 'python.org'\r\n* Nanosurf Studio or any classic Nanosurf controller software with 'Scripting Interface' option activated\r\n\r\n## Installation and upgrading\r\n\r\nTo install the package, open a Windows Command Prompt and run:\r\n\r\n```shell\r\npip install nanosurf\r\n```\r\n\r\nTo upgrade your nanosurf package to the newest version,\r\nopen Windows Command Prompt and run:\r\n\r\n```shell\r\npip install nanosurf -U\r\n```\r\n\r\n## Running the examples\r\n\r\nIn the library, Nanosurf provides a documentation, demo scripts, applications for some hardware addons and templates to give you a quick start.\r\nThey are in the nanosurf package sub folders \"app\" and \"doc\". But where are they on your system?\r\n\r\nDepending on the exact installation of python, the package folders can be at very different places.\r\nOpen Windows Command Prompt and type:\r\n\r\n```python\r\npython \r\n>>> import nanosurf\r\n>>> nanosurf.help()\r\n```\r\n\r\nThe output of this command print the exact path to the app and doc folder.\r\n\r\nWe suggest to use Visual Studio Code as your IDE to run, write and debug your Python code.\r\nUse one of path to open the example scripts\r\n\r\n## AFM Software Programmers Manual\r\n\r\nThe classic Nanosurf AFM Control Software has a own programmers manual and can be found in the Scripting Manual\r\nin Nanosurf controller software under Help tab:\r\nHelp -> Manuals -> Script Programmers Manual\r\n\r\nUnfortunately the Nanosurf Studio application do not yet have its own programmers manual. But we are working hard to provide this.\r\n\r\n## Library Version History\r\n\r\n* v1.12.3\r\n  * Bugfix: nhf_reader: Again, dataset conversion to some units with segment.read_channel() could go wrong\r\n\r\n* v1.12.2\r\n  * Bugfix: installation dependency for PyQtGraph package. Currently it only works with PySide6 version <=6.9.0\r\n  * Bugfix: nhf_reader: list of available units with dataset.units() where not always complete \r\n  * Bugfix: nhf_reader: Dataset conversion to some units with segment.read_channel() could sometimes not be resolved\r\n  * Bugfix: some devices where not enabled with platform Linux\r\n  * Update: improved versions of device drivers form TMP117/119 and SHT45\r\n  * Update: Some improvement in I2C bus access in Nanosurf_Linux\r\n  * New: Add support for GSSClimateSensor device\r\n\r\n* v1.12.1\r\n  * Bugfix: nsf_sci_edit and nsf_edit value changed registration was wrong\r\n  * Update: studio code wrapper supports now UTF-8 strings\r\n  * Update: Support for embedded Nanosurf_Linux without GUI\r\n  * Update: How to install on Linux (RaspberryOS, ore others)\r\n  * New: I2C classes for TMP119 and SHT4x chips\r\n\r\n\r\n* v1.12.0\r\n  * Update: nhf_reader supports v2.x files\r\n  * New: I2C BusMaster support on Linux platform\r\n\r\n* v1.11.0\r\n  * Update: nhf_reader supports multiple calibrations stored in file\r\n  * Update: nhf_reader supports data sets with NaN-Values (not-an-number) and not measured points\r\n  * Update: nhf_reader has its own documentation in doc folder\r\n  * New: Application for \"VMF Sample Holder 2\"\r\n\r\n* v1.10.1\r\n  * Update: Spectroscopy analysis scripts has improved fit ranges\r\n  * Bugfix: Studio access to I2C-Bus failed\r\n  * Bugfix: nhf_reader did not handle datasets with NaN values\r\n  * Bugfix: nhf_reader converted small integer data ranges incorrect\r\n\r\n* v1.10.0\r\n  * Python 3.13 support\r\n  * update spm_template: support of continuos measurement, input/output channels and fixation of y-range\r\n  * Bugfix: qt_framework was not shutting down modules properly and did not store last settings\r\n\r\n* v1.9.5\r\n  * Bugfix: studio wrapper generator was not python 3.12 compatible\r\n  * Limit installation of nanosurf library from 3.9 up to 3.12.\r\n\r\n* v1.9.4\r\n  * Bugfix: nhf_reader.read_channel() could not be call multiple times correctly\r\n  * Bugfix: nhf_reader.read_channel() channel with \"int\"-unit have now np.int32\r\n\r\n* v1.9.3\r\n  * updated NHFFileReader class supports nhf-files version 2.1\r\n  * Bugfix: Change list of shown items in NSFComboBox during runtime failed\r\n\r\n* v1.9.2\r\n  * Update installation requirements to fulfill numpy 2.0 minimal library version\r\n  * Bugfix: Change list of shown items in NSFComboBox during runtime failed\r\n\r\n* v1.9.1\r\n  * Bugfix: AccessoryInterface class did not handle port-switching and slave-id readout properly\r\n  * Bugfix: AppFramework: Module without screen could not be initialized properly\r\n\r\n* v1.9.0\r\n  * Python 3.12 support\r\n  * New: Spectroscopy analysis scripts with contact mechanics models\r\n  * New: Control app for the DriveAFM TipAccess Addon\r\n  * New: Control app for the DriveAFM TipCurrent Addon\r\n  * New: Platform support for Linux and Mac: installation and usage of post processing functions are possible\r\n  * updated NHFFileReader class supports now nhf-files version 2\r\n  * updated pyinstaller template supports now scipy import in exe\r\n  * updated documentation with installation guide, library overview and GUI-App programming\r\n\r\n* v1.8.6\r\n  * Bugfix: Class AccessoryInterface did not work after update for Studio i2c support\r\n  * Add option 'log_amp' to plot.plot_bode()\r\n\r\n* v1.8.5\r\n  * Bugfix: Reloading of new Studio wrapper classes in first run did not work\r\n  * Bugfix: sci_math.compress_spectrum() keep channel name intact\r\n  * Add option 'log_y' to plot.plot_spectrum()\r\n  \r\n* v1.8.4\r\n  * Bugfix: add missing lupa files for pyinstaller\r\n  * New: add I2C-Devices: MCP45XX, MAX1161x and MMA8451\r\n\r\n* v1.8.3\r\n  * Bugfix: data scaling for channels without calibration factors\r\n\r\n* v1.8.2\r\n  * New intro page for PyPi\r\n\r\n* v1.8.1\r\n  * fix python version requirement check\r\n\r\n* v1.8.0\r\n  * prevent installation with python 3.12 due to incompatible lupa package\r\n  * add I2C class support for Studio\r\n  * nanosurf.app/demo_wave_mode_nma_analysis: added Hertz model\r\n\r\n* v1.7.2\r\n  * New: nanosurf.app/demo_wave_mode_nma_analysis: more options for file dialog\r\n\r\n* v1.7.1\r\n  * Bugfix: Image Points/lines where swapped on gwy_export\r\n\r\n* v1.7.0\r\n  * New: nanosurf.app/demo_wave_mode_nma_analysis: script which calculates max_force, adhesion and stiffness\r\n  * New: nanosurf.lib.util.nhf_reader: Studio measurement files (*.nhf) reader\r\n  * New: nanosurf.lib.util.nid_reader: Classic measurement files (*.nid) reader\r\n  * New: nanosurf.lib.util.gwy_export: Gwyddion data file creator/exporter\r\n  * New: nanosurf.app/py_installer_template: makes creating *.exe from python apps simple\r\n  \r\n* v1.6.2\r\n  * New: qt_app_framwork supports multi screen modules\r\n  * Bugfix: settings should not be of dataclass type\r\n\r\n* v1.6.1\r\n  * Bugfix: pip packaging did not copy framework files\r\n\r\n* v1.6.0\r\n  * New: spm_template: A new template to demonstrate simple connection to CX/Studio and measure some data\r\n  * New: app_DriveAFM_Tip_Current_Addon this app controls the amplifier of the Tip-Current Addon\r\n  * New: demo_move_sample_stage. This demo shows basic stage movements\r\n  * New: demo_lateral_force_signal_calibration. This demo shows how to calibrate the lateral force signal\r\n  * New: nanosurf.plot. A package to easily plot data array from lists, numpy array, SciChannel and SciStream\r\n  * New: nanosurf.spm.lowlevel.DataSamplerAccess. A class to make data sampling easier for CX/Studio\r\n  * New: nanosurf.frameworks.qt_app: A framework to easily create nice Qt applications\r\n  * Update: all applications are using the new qt_app framework of the library\r\n  * Update: app_frequency_sweep: add logarithmic plotting capability\r\n  * Bugfix: app_frequency_sweep: excitation mode was inverted\r\n\r\n* v1.5.1\r\n  * Bugfix: Do not convert Lua arrays with string-keys\r\n  * Bugfix: Improved Python enum conversion to Lua\r\n\r\n* v1.5.0\r\n  * Library supports now python v3.11\r\n  * Library supports now PySide2 and PySide6\r\n\r\n* v1.4.1\r\n  * bugfix: Studio vector attributes are defined as .vector instead of .value\r\n  * improve installation instruction for editable mode\r\n\r\n* v1.4.0\r\n  * Add enum support for Nanosurf Studio scripting interface\r\n  * Nanosurf Studio properties and LogicalUnits attributes have common interface style\r\n  * Add revers ramp feature to App_Switching_Spectroscopy\r\n  * Some small improvements to other applications\r\n\r\n* v1.3.4\r\n  * fix bug in frequency_sweep\r\n\r\n* v1.3.3\r\n  * Improve visual appearance of some nsf.gui elements\r\n  * fix eeprom memory write access for i2c.chip_24LC34A\r\n  * better return value for fileutil.create_unique_folder() in case of error\r\n\r\n* v1.3.2\r\n  * Bugfix: Studio - handling of boolean properties was not working\r\n  * Add support for DriveAFM Camera i2c-chip\r\n\r\n* v1.3.1\r\n  * Bugfix: App_switching_spectroscopy - selection of output and amplitude setting had some issues\r\n\r\n* v1.3.0\r\n  * Add simplifies library usage is possible. Just write 'import nanosurf as nsf' and full access to sub-libraries is provided in visual studio code\r\n  * new app: app_switching_spectroscopy provides the possibility to measure in \"Switching Spectroscopy\"-Mode\r\n  * new qui elements: nsf.gui.NSFEdit and nsf.gui.NSFComboBox\r\n  * Bugfix: Wrong number type in Python for double based property   \r\n  * Bugfix: nsf.spm.workflow.frequency_sweep: PositionX/Y/Z was not working as output\r\n\r\n* v1.2.0\r\n  * Add Studio scripting support\r\n\r\n* v1.1.0\r\n  * Add direct I2C motor control\r\n\r\n* v1.0.0\r\n  * Initial release\r\n\r\n### License\r\n\r\n[MIT License](https://en.wikipedia.org/wiki/MIT_License)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python API for Nanosurf controllers and Nanosurf style application framework",
    "version": "1.12.3",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42c9515c9dd755a2c84db45133fb0a76edb0eed4739c5c56cd55b5bd13d51899",
                "md5": "c5e80717bb3651bed0094aa1f47fd277",
                "sha256": "4651ce632737886fa2b3e6e8311b689fc935e7f23ccf373bb2ac4d74d2d62595"
            },
            "downloads": -1,
            "filename": "nanosurf-1.12.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5e80717bb3651bed0094aa1f47fd277",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9",
            "size": 12932231,
            "upload_time": "2025-07-16T13:28:58",
            "upload_time_iso_8601": "2025-07-16T13:28:58.092271Z",
            "url": "https://files.pythonhosted.org/packages/42/c9/515c9dd755a2c84db45133fb0a76edb0eed4739c5c56cd55b5bd13d51899/nanosurf-1.12.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9e150d4bdb11def009191cab0b5c567736af14b0ba863c08285b7845427ba5c",
                "md5": "f60abdd05d1991c2073834aca70454c1",
                "sha256": "f26089665c58d7ec1a7c430ef5db33bf70e2d55753fbb34246b8bff16adec18c"
            },
            "downloads": -1,
            "filename": "nanosurf-1.12.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f60abdd05d1991c2073834aca70454c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9",
            "size": 12600159,
            "upload_time": "2025-07-16T13:29:00",
            "upload_time_iso_8601": "2025-07-16T13:29:00.396901Z",
            "url": "https://files.pythonhosted.org/packages/d9/e1/50d4bdb11def009191cab0b5c567736af14b0ba863c08285b7845427ba5c/nanosurf-1.12.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 13:29:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nanosurf"
}
        
Elapsed time: 2.07779s