## 2.1 Simulated videos

Simulated videos are generated in triplicate using an in-house MATLAB® (The MathWorks, Natick, MA) code. The simulated particle concentration mimics the one used in experimental images (6x109 \(\text{p}\text{a}\text{r}\text{t}\text{i}\text{c}\text{l}\text{e}\text{s}/\text{m}\text{L}\)). Additionally, the code implements various diffusion coefficients to generate videos with varying diffusivity. The simulated images are 1024 x 1024 pixel2 areas, like an experimental microscope setup with a 40X objective on an inverted microscope (Zeiss Axio Observer, Zeiss, White Plains, NY). The experimental measurements are recorded with 1 x 1 binning and a lag time (\(\varDelta \text{t}\)) of 0.067 seconds (15 frames per second).

Plotting is used to simulate the particle paths instead of indexing to avoid losing sub-pixel information of simulated particles’ location. For each image, location information is plotted as a scatter plot, and then a Gaussian filter is applied to add the padding around the point source location.

Three different flow profiles are generated: uniform, Couette, and Poiseuille. Their velocity profiles are distributed so that the zero velocity points (when they exist) are at the edge of each simulated image. The maximum value of each velocity profile is increased from 1–10 pixels with a 1-pixel increment. The particle motions from convective flow are overlayed on top of the Brownian diffusion. All convective flows proceed from left to right. The effect of the angle of the convective flow is explored by generating flows with various degrees of shear at angles varying from 0–80 degrees with a 10-degree increment.

## 2.2 Experimental setup

We made a simple chip to contain the seeded particle solution for experimental imaging with an overall dimension of 1 cm by 1 cm. The chip is composed of 4 layers: 2 layers of 188 \({\mu }\text{m}\) thick cyclic olefin polymer (COP) (Zeonor, Tokyo, Japan), 142 \({\mu }\text{m}\) thick pressure-sensitive adhesives (PSA) (Adhesives Research, Glen Rock, PA), and 5 mm polydimethylsiloxane (PDMS) (Sylgard 184, Dow Corning, Auburn, MI, USA) (Fig. 1a). For the PSA layer, a channel with the dimensions of 2 mm by 2 cm is cut using a VLS3.75 laser cutter (Universal Laser Systems, Scottsdale, AZ). For one of the two layers of COP, 2 mm diameter through-holes are punched at the inlet and the outlet. The syringe pump (kdScientific, Holliston, MA) is used to control the increments of flow rate through the chip. The 3 \(\text{m}\text{L}\) BD Luer-Lok syringe (Becton, Dickinson and Company, Franklin Lakes, NJ) paired with PEEK tubing (Idex Health & Science, Oak Harbor, WA) is used to connect the syringe pump with the chip. A 5 cm by 5 cm cast of 5 mm thick PDMS is cut to the size of the overall chip and is used as supporting material for the PEEK tubing, aligned with the inlet and outlet of the chip (Fig. 1b).

In the experiment, 500 nm Yellow-Green (Ex441/Em485) fluorescent microspheres (Polysciences, Niles, IL) are diluted in deionized water to a final concentration of 6x109 \(\text{p}\text{a}\text{r}\text{t}\text{i}\text{c}\text{l}\text{e}\text{s}/\text{m}\text{L}\). The recordings are taken at room temperature using an inverted fluorescence microscope (Axio Observer, Zeiss, White Plains, NY), equipped with an high-intensity LED lamp and 40X magnification objective. The images of the Yellow-Green particles are recorded using an iPhone 6 (Apple, Cupertino, CA) mounted to the eyepiece of the microscope using an adaptor (Gosky Optics, Zhejiang Province, China) (Fig. 1c). The adaptor is modified using two spacers, at a total thickness of 1.5 cm, to distance the eyepiece of the microscope and the iPhone 6, achieving the optimal focal length.

Using an objective micrometer (Carolina, Burlington, NC), the field of view on the recording device is calculated to be 57.4 \({\mu }\text{m}\). For the experimental flow rates, conversions are applied to match the parameter used in the simulation. The simulated image sets have their maximum velocity increased at a rate of 1 \(\text{p}\text{i}\text{x}\text{e}\text{l}/\varDelta \text{t}\) (Fig. 1d). With the channel geometry of \(2 \text{m}\text{m} \times 2 \text{c}\text{m}\times 142 {\mu }\text{m}\), the calculation shows the volumetric flow rate of 77 \(\text{n}\text{L}/\text{m}\text{i}\text{n}\) is equivalent to the planar velocity increment of 1 \(\text{p}\text{i}\text{x}\text{e}\text{l}/\varDelta \text{t}\) in the simulated cases. The syringe pump controls the volumetric flow rate from 77 to 1702 \(\text{n}\text{L}/\text{m}\text{i}\text{n}\) (22 \(\text{p}\text{i}\text{x}\text{e}\text{l}/\varDelta \text{t}\)). Each recording contains 300 image pairs (~ 21 seconds). 3–5 videos are recorded per increment of the flow rate.

## 2.3 Flow adjustments to Particle Diffusometry

Modifications are made on a pre-existing in-house MATLAB® (The MathWorks, Natick, MA) code built for end-point diffusion coefficient measurements. A 128 x 128 pixel2 interrogation window containing, on average 8–10 particles was used for 100 image frame stacks (~ 8 seconds of data) for a high signal-to-noise ratio while maintaining a statistically relevant number of data points (Clayton et al. 2017b). Instead of using the correlation peak width from a single image pair, temporal averaging is used to reduce random error propagation. Correlation peaks from 100 sequential image pairs are averaged (Samarage et al. 2012).

Experimental recordings of fluorescent particles do not necessarily form Gaussian intensity profiles due to impurities in the particle shapes, aggregation of particles, unbalanced illumination, and the presence of shear flow (Westerweel 2008). These irregularities cause the correlation peak to be stretched in the z-direction, not entirely following a Gaussian profile. For both the simulation and experimental cases, the fitted Gaussian peak tends to be broader and shorter than the raw correlation peak (Fig. 2a) when fitting the curve of the overall interrogation plane (Scharnowski and Kähler 2016). Also, uncertainties in the experimental setup such as particle shape deformation, aggregation, and illumination produce background noises, causing the base value to rise from zero. The fitting of non-Gaussian peaks and correcting the baseline are necessary.

The entire interrogation window of 128 x 128 pixel2 values is averaged, excluding the center 11 x 11 pixel2, and subtracted to match the baseline of the overall interrogation window. This baseline subtraction corrects the correlation of random fluctuations (Westerweel 1997; Xue et al. 2014). Next, for the peak fitting, an elliptical Gaussian profile is drawn using a two-part separated peak fit to obtain the peak width of each correlation peak. The two-part separated peak fit is used due to the elongated center value. Therefore, peak fit is split into two parts, a height fit, and a width fit, as the process is described in Fig. 2b. First, a 3 by 3 pixel2 region encapsulating the pixel-level maximum location of the peak is used to identify the sub-pixel location of the maximum peak height (Nobach and Honkanen 2005; Blumrich 2010). Next, a 5 by 5 pixel2 region surrounding the pixel-level maximum location excluding the center value (the maximum) is used to capture the Gaussian peak with its width information matching the correlation peak. This combined Gaussian surface fit is used to calculate the 2D profile of the auto- and cross-correlation peaks.

The width of the correlation peak is defined by the width of the peak at 1/e height (Olsen and Adrian 2000b). The width of the streamwise and cross-streamwise directional Gaussian curves are calculated by extracting the parameters of the equation of an ellipse in implicit form. Two radii of the ellipses are then computed using the algebraic manipulation of implicit and the general equation of ellipses (Reed and Hutchinson 1994). Since the Brownian motion along one coordinate axis is independent of the other, the axis length perpendicular to the flow direction is used as the correlation peak width (Chamarthy et al. 2009) (Fig. 2c).

## 2.4 Flow velocity confirmation

A secondary method is required to verify the results of the modified algorithm on the simulated videos. A single-pass PIV analysis is applied to the image pairs identifying the velocity vectors for the interrogation windows. The general assumption is that the flow direction does not change within the duration of 100 image pairs, which is indeed true for the simulated videos. For each interrogation window, a simple 5-point Gaussian sub-pixel peak fit is used to locate the true location of the peak maximum (Raffel et al. 2007). The true center location is recorded for all the pairs and averaged to the location of each interrogation window. The x- and y-directional shift is measured by identifying the peak maximum shift from the center of the interrogation window. The computed flow vectors are compared to the simulated values since the flow velocities are a known factor in the simulated videos.

## 2.5 Flow profile identification

The uniform flow profile case is investigated to provide a model experiment to test the accuracy of the simulation. To ensure the uniform flow profile is maintained within the channel, the velocity profile along the width and height of the rectangular channel is calculated. The velocity profiles for a rectangular channel can be derived as,

$$\begin{array}{c}u\left(y,z\right)=\frac{4{h}^{2}\varDelta p}{{\pi }^{3}\eta L}{\sum }_{n,odd}^{\infty }\frac{1}{{n}^{3}}\left[1-\frac{\text{cosh}n\pi \frac{y}{h}}{\text{cosh}n\pi \frac{w}{2h}}\right]\text{sin}n\pi \frac{z}{h}\left(3\right)\end{array}$$

where \(\varDelta p\) is the pressure difference, \(\eta\) is viscosity, w, h, and L are the channel's width, height, and length, respectively, and x, y, and z are the coordinate axes along the channel (White 1991). Along the channel width, the flow profile in Eq. 3 is that of uniform flow. For the height of the flow, depth of correlation (DOC) also needs to be considered. The expression for the DOC can be derived as,

$$\begin{array}{c}{z}_{corr}=2\sqrt{\frac{1-\sqrt{ϵ}}{\sqrt{ϵ}}\left[\frac{{n}_{0}^{2}{d}_{p}^{2}}{4N{A}^{2}}+\frac{5.95{\left(M+1\right)}^{2}{\lambda }^{2}{n}_{0}^{4}}{16{M}^{2}N{A}^{4}}\right]}\left(4\right)\end{array}$$

where \(ϵ\) is the threshold weighting function, normally taken as 0.01, \({n}_{0}\) is the index of refraction of the immersion medium, \({d}_{p}\) is the particle diameter, \(NA\) is the numerical aperture of the objective, \(\lambda\) is the wavelength of the light, and \(M\) is the objective magnification (Bourdon et al. 2005; Wereley and Meinhart 2009). Parameters used for the experiments are as such, \({d}_{p}=470 nm, NA=0.95, \lambda =488 nm, M=40\). The depth of correlation is calculated to be 2.514 \(\mu m\) using these parameters. Applying Equations 3 and 4, the velocity variation along the z-direction is no more than 0.03%, showing the flow profile variation in the height dimension of the flow is negligible.

Experimentally, the flow profile of the recording always remains uniform if the recording takes place at the center of the rectangular cross-section of the channel geometry. With the syringe pump pushing liquid at constant flow rates, the overall particle behavior should be aligned to a single direction with a minimal angular variation.