afmformats.formats.fmt_workshop.ws_single

Functions

afmformats.formats.fmt_workshop.ws_single.load_csv(path, callback=None, meta_override=None, mode='single')[source]

Load csv data from AFM workshop

The files are structured like this:

Force-Distance Curve
File Format:    3

Date:    Wednesday, August 1, 2018
Time:    1:07:47 PM
Mode:    Single
Point:    1
X, um:    27.250000
Y, um:    27.250000

Extend Z-Sense(nm),Extend T-B(V),Retract Z-Sense(nm),Retract T-B(V)
13777.9288,0.6875,14167.9288,1.0917
13778.9288,0.6874,14166.9288,1.0722
13779.9288,0.6876,14165.9288,1.0693
13780.9288,0.6877,14164.9288,1.0824
13781.9288,0.6875,14163.9288,1.0989
...

The data for testing was kindly provided by Peter Eaton (afmhelp.com).

Parameters
  • path (str or pathlib.Path or io.TextIOBase) – data file or an open file in text (not bytes) mode

  • callback (callable) – function for progress tracking; must accept a float in [0, 1] as an argument.

  • meta_override (dict) – if specified, contains key-value pairs of metadata that are used when loading the files (see afmformats.meta.META_FIELDS)

  • mode (str) – curve mode to expect (either “single” or “mapping”); if an unexpected mode is found, AFMWorkshopFormatWarning is issued