Package: nanoscope
NanoscopePackage to read data files collected using Bruker, Veeco, and Digital Instruments Atomic Force Microscopes (AFMs) using Nanoscope v5.12 - v10.00 acquisition software.  There is also some support for data acquired with the NanoDrive acquisition software.Supported file types include:Image data filesRamp data (e.g. force curves without a surface hold segment, SECM data, etc. )Force curves with a surface hold segmentForce Volume data without hold segmentForce Volume data with surface hold segment (electrical DCUBEs, AFM-nDMA, FFV-CR, etc.)PeakForce Capture (PFC) data (collected in PeakForce QNM)High Speed Data Capture (HSDC) dataScript data (RampScripting, AFM-nDMA, SS-PFM, etc.)NanoDrive Image dataThe package parses the header and provides scaled data in desired units (Volt, Metric, Force).  Additionally there is a small subset of other header information available (spring constant, etc.).InstallationUse the pip package manager to install nanoscope.$pipinstallnanoscopeRequirementsThis module requires the following:Microsoft Windows 7 - 10 operating systemPython 2.7.8 - 3.11.4 (64bit preferred)You can check the version and whether it is 64bit by launching the Python command line interface.Microsoft Visual C++ 2012, 2015 or 2017 Redistributable (x64 version if using 64bit Python).You can check which version(s) are installed by looking in “Control Panel\All Control Panel Items\Programs and Features”.If needed, download it fromhttps://visualstudio.microsoft.com/vs/older-downloads/UsageNote that acquisition channel numbers start with zero, not with one as is the convention in Nanoscope software.For detailed examples, please refer to the included example code (and associated raw data files).  It is contained in the module, but not imported by default.importnanoscopeasnsns.examples.copy_examples_code()# prompt user to save a copy of the examples code Examples.pyhelp(ns.examples)# get a list of specific examplesns.examples.run_example(2)# run example #2Examples.pycontains the following code for example #2 to read and plot a force curve with hold segment:importmatplotlib.pyplotaspltimportnanoscopefromnanoscopeimportfilesfromnanoscope.constantsimportFORCE,METRIC,VOLTS,PLT_kwargsi_chan=0# This will provide Nanoscope channel #1withfiles.HoldCurveFile("ForceHold.spm")asfile_:channel=file_[i_chan]# get timed data of channelft_plot,ax_properties=channel.create_force_time_plot(METRIC)plt.plot(ft_plot.x,ft_plot.y)plt.gca().set(**ax_properties)# set axes propertiesplt.show()hold_plot,ax_properties=channel.create_force_hold_time_plot(METRIC)plt.plot(hold_plot.x,hold_plot.y)plt.gca().set(**ax_properties)# set axes propertiesplt.show()Resulting in 2 plots, the first showing the deflection error versus time, the second showing the same data but only for the force hold.SupportSupport for installation issues can be obtained by contacting the Bruker AFM service team atafm.support@bruker.com.  As this package is provided at no charge, it is not feasible to provide support beyond helping with installation issues at this time.For bug reports and feature requests, please emailafm.support@bruker.comwith "BUG" or "FEATURE" in the subject line.  Also, please include an example raw Nanoscope data file along with the usual other relevant information.License