dpivsoft.Classes¶
- class dpivsoft.Classes.Parameters[source]¶
Bases:
objectContainer for all the parameter options used to perform PIV.
Default values are defined here. There are two ways to change the values for a specific DPIV run:
Change the specific value manually on python shell or on the running script.
Example: Parameters.box_size_1_x = 128
Load all the parameters included in a yaml file by using readParameters classmethod.
Example: Parameters.readParameters(‘folder/filename’)
- box_size_1_x = 64¶
- box_size_1_y = 64¶
- no_boxes_1_x = 64¶
- no_boxes_1_y = 32¶
- window_1_x = 48¶
- window_1_y = 48¶
- box_size_2_x = 32¶
- box_size_2_y = 32¶
- no_boxes_2_x = 128¶
- no_boxes_2_y = 64¶
- window_2_x = 32¶
- window_2_y = 32¶
- no_iter_1 = 1¶
- no_iter_2 = 2¶
- direct_calc = False¶
- mask = False¶
- stereo = False¶
- peak_ratio = 1¶
- weighting = False¶
- gaussian_size = 0¶
- median_limit = 0.5¶
- calibration = 1¶
- delta_t = 1¶
- class Data[source]¶
Bases:
objectHolds run-specific data such as the mask and its file paths.
- path_mask = 'none'¶
- path_stereo = 'none'¶
- class Stereo_Calibration(npz_file)[source]¶
Bases:
objectLoads a stereo calibration from an .npz file: the pixel->world forward fits (fwd_*) and the Soloff world->pixel maps (map_*) for both cameras, plus the camera configuration.
- class dpivsoft.Classes.grid[source]¶
Bases:
objectHolds the PIV grids (window centers and box origins) for both passes, built from the image size and the current Parameters.
- class dpivsoft.Classes.Synt_Img[source]¶
Bases:
objectContains the parameters to generate a pair of synthetic images following a given flow velocity field. The default values can be changed manually.
- Variables:
width (int) – Number of pixels in the x-direction of the generated image.
height (int) – Number of pixels in the y-direction of the generated image.
trazers_density (float) – Number of particles generated per pixel. Must be a float between 0 and 1.
vel (float) –
Characteristic velocity of the canonical flow used to generate the particle displacement.
Note: it has a different definition for each flow.
Shine_m (int) – Mean brightness of the tracer core (from 0 to 255).
d_Shine (int) – Triangular variability of the tracer brightness.
d_D (int or float) – Triangular variability of the tracer diameter.
noise_m (int) – Mean of the random noise.
d_noise (int) – Triangular variability of the image noise.
vel_profile (str) –
Name of the flow velocity field used. The following options are available:
- Constant: Flow with a constant displacement of “vel” pixels on
the x-direction
- Couette: Couette flow in x-direction using a moving condition
of “vel” pixels between images on top wall. Bottom limit of the images is not moving.
- Poiseuille: Poiseuille flow in x direction with no-slip condition
on top and bottom of the images. The parameter “vel” indicates the maximum velocity of the flow in pixels.
- Vortex: Flow generated by a Scully vortex (see Scully 1975). Vel
is the maximum velocity of the vortex in pixel/frame.
- Frequency: Spatial frequency wave along the y-direction. This
flow allows testing the PIV frequency response (see Scarano & Riethmuller, 2000). In this case the maximum pixel displacement on the wave is always 2 pixels, and the parameter “vel” indicates the wavelength.
ext (str) – Extension used to save the images.
- width = 1024¶
- height = 1024¶
- vel_profile = 'Vortex'¶
- vel = 8¶
- amp = 125.66370614359172¶
- n_steps = 10¶
- trazers_density = 0.05¶
- Shine_m = 230¶
- d_Shine = 80¶
- D_m = 4¶
- d_D = 3¶
- noise_m = 1¶
- d_noise = 1¶
- ext = '.png'¶