open_piv_gui_tools¶
Methods for reuse within the OpenPivGui project.
-
openpivgui.open_piv_gui_tools.
create_save_vec_fname
(path='/home/docs/checkouts/readthedocs.org/user_builds/openpiv-tk-gui/checkouts/latest/docs', basename=None, postfix='', count=-1, max_count=9)¶ Assembles a valid absolute path for saving vector data.
Parameters: - path (str) – Directory path. Default: Working directory.
- basename (str) – Prefix. Default: None.
- postfix (str) – Postfix. Default: None.
- count (int) – Counter for numbering filenames. Default: -1 (no number)
- max_count (int) – Highest number to expect. Used for generating leading zeros. Default: 9 (no leading zeros).
-
openpivgui.open_piv_gui_tools.
get_dim
(array)¶ Computes dimension of vector data.
Assumes data to be organised as follows (example): x y v_x v_y 16 16 4.5 3.2 32 16 4.3 3.1 16 32 4.2 3.5 32 32 4.5 3.2
Parameters: array (np.array) – Flat numpy array. Returns: Dimension of the vector field (x, y). Return type: tuple
-
openpivgui.open_piv_gui_tools.
str2dict
(s)¶ Parses a string representation of a dictionary.
Parameters: s (str) – Comma separated list of colon separated key value pairs. Example
str2dict(‘key1: value1’, ‘key2: value2’)
-
openpivgui.open_piv_gui_tools.
str2list
(s)¶ Parses a string representation of a list.
Parameters: s (str) – String containing comma separated values. Example
str2list(‘img01.png’, ‘img02.png’)
Returns: Return type: list