afmformats.afm_qmap
Functions
qmap_feature()
: Decorator for labeling AFMQMap features
- afmformats.afm_qmap.qmap_feature(name, unit, cache=False)[source]
Decorator for labeling AFMQMap features
The name and unit are stored as properties of the wrapped function. In addition, the return value of the function can be cached (see cache argument).
- Parameters
name (str) – Name of the feature
unit (str) – Unit of the returned feature
cache (bool or callable) – If boolean, determines whether the feature data should be cached or not. If callable, the callable gets an instance of AFMData as an argument and should return an identifier (str) for the current value. If that identifier is the same as in the cache, then the cached value is used.
Classes
AFMQMap
: Management of quantitative AFM data on a grid
- class afmformats.afm_qmap.AFMQMap(path_or_group, meta_override=None, callback=None, modality=None, data_classes_by_modality=None)[source]
Management of quantitative AFM data on a grid
- Parameters
path_or_group (str or pathlib.Path or afmformats.afm_group.AFMGroup) – The path to the data file or an instance of AFMGroup
meta_override (dict) – Dictionary with metadata that is used when loading the data in path.
callback (callable or None) – A method that accepts a float between 0 and 1 to externally track the process of loading the data.
data_classes_by_modality (dict) – Override the default AFMData class to use for managing the data (see
default_data_classes_by_modality
): This is e.g. used by index to pass Indentation (which is a subclass of the default AFMForceDistance) for handling “force-indentation” data.
Inheritance
- get_coords(which='px')[source]
Get the qmap coordinates for each curve in AFMQMap.group
- Parameters
which (str) – “px” for pixels or “um” for microns.
- get_qmap(feature, qmap_only=False)[source]
Return the quantitative map for a feature
- Parameters
feature (str) – Feature to compute map for (see
QMap.features
)qmap_only – Only return the quantitative map data, not the coordinates
- Returns
x, y (1d ndarray) – Only returned if qmap_only is False; Pixel grid coordinates along x and y
qmap (2d ndarray) – Quantitative map
- property extent
extent (x1, x2, y1, y2) [µm]
- features
Available features
- group
AFM data (instance of
afmformats.afm_group.AFMGroup
)
- property shape
shape of the map [px]
Variables
- afmformats.afm_qmap.unit_scales
Scale conversion helper
{'': 1, 'k': 1000.0, 'm': 0.001, 'n': 1e-09, 'p': 1e-12, 'µ': 1e-06}