openpiv.tools.display_vector_field

openpiv.tools.display_vector_field(filename: Union[pathlib.Path, str], on_img: Optional[bool] = False, image_name: Union[pathlib.Path, str, None] = None, window_size: Optional[int] = 32, scaling_factor: Optional[float] = 1.0, ax: Optional[Any] = None, width: Optional[float] = 0.0025, show_invalid: Optional[bool] = True, **kw)[source]

Displays quiver plot of the data stored in the file

Parameters:
  • filename (string) – the absolute path of the text file
  • on_img (Bool, optional) – if True, display the vector field on top of the image provided by image_name
  • image_name (string, optional) – path to the image to plot the vector field onto when on_img is True
  • window_size (int, optional) – when on_img is True, provide the interrogation window size to fit the background image to the vector field
  • scaling_factor (float, optional) – when on_img is True, provide the scaling factor to scale the background image to the vector field
  • show_invalid (bool, show or not the invalid vectors, default is True) –
Key arguments : (additional parameters, optional)
scale: [None | float] width: [None | float]

matplotlib.pyplot.quiver

Examples

— only vector field >>> openpiv.tools.display_vector_field(‘./exp1_0000.txt’,scale=100,

width=0.0025)

— vector field on top of image >>> openpiv.tools.display_vector_field(Path(‘./exp1_0000.txt’), on_img=True,

image_name=Path(‘exp1_001_a.bmp’), window_size=32, scaling_factor=70, scale=100, width=0.0025)