openpiv.tools.save

openpiv.tools.save(x: ndarray, y: ndarray, u: ndarray, v: ndarray, mask: ndarray, filename: Union[Path, str], fmt: str = '%8.4f', delimiter: str = '\t') None[source]

Save flow field to an ascii file.

Parameters
  • x (2d np.ndarray) – a two dimensional array containing the x coordinates of the interrogation window centers, in pixels.

  • y (2d np.ndarray) – a two dimensional array containing the y coordinates of the interrogation window centers, in pixels.

  • u (2d np.ndarray) – a two dimensional array containing the u velocity components, in pixels/seconds.

  • v (2d np.ndarray) – a two dimensional array containing the v velocity components, in pixels/seconds.

  • mask (2d np.ndarray) – a two dimensional boolen array where elements corresponding to invalid vectors are True.

  • filename (string) – the path of the file where to save the flow field

  • fmt (string) – a format string. See documentation of numpy.savetxt for more details.

  • delimiter (string) – character separating columns

Examples

openpiv.tools.save( x, y, u, v, ‘field_001.txt’, fmt=’%6.3f’,

delimiter=’ ‘)