%23%20%2F%2F%2F%20script%0A%23%20requires-python%20%3D%20%22%3E%3D3.11%22%0A%23%20dependencies%20%3D%20%5B%0A%23%20%20%20%20%20%22marimo%22%2C%0A%23%20%20%20%20%20%22openpiv%3D%3D0.26.3%22%2C%0A%23%20%20%20%20%20%22numpy%22%2C%0A%23%20%20%20%20%20%22matplotlib%22%2C%0A%23%20%20%20%20%20%22scipy%22%2C%0A%23%20%20%20%20%20%22scikit-image%22%2C%0A%23%20%5D%0A%23%20%2F%2F%2F%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.25.2%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%2006%20%E2%80%94%20Tips%2C%20tricks%20%26%20pitfalls%0A%0A%20%20%20%20A%20practical%20checklist%20for%20reliable%20PIV%20with%20OpenPIV%2C%20illustrated%20by%20repository%20examples.%0A%0A%20%20%20%20%23%23%20Experiment%20%26%20images%0A%20%20%20%20-%20**Seeding%20density**%3A%20~5%E2%80%9310%20particle%20pairs%20per%20interrogation%20window.%0A%20%20%20%20-%20**Particle%20size**%3A%20~2%E2%80%933%20pixels%20is%20often%20ideal%20for%20subpixel%20peak%20fitting.%0A%20%20%20%20-%20**Displacement**%3A%20aim%20for%20~1%2F4%20of%20window%20size%20between%20frames.%0A%20%20%20%20-%20**Avoid**%20saturation%2C%20motion%20blur%2C%20strong%20reflections%2C%20and%20large%20out-of-plane%20loss.%0A%0A%20%20%20%20%23%23%20Processing%20choices%0A%20%20%20%20-%20**Window%20size**%3A%20large%20%3D%20robust%20but%20low%20resolution%3B%20small%20%3D%20detailed%20but%20noisy.%0A%20%20%20%20-%20**Overlap**%3A%2050%25%20default%3B%2075%25%20smoother-looking%20but%20correlated.%0A%20%20%20%20-%20**Multi-pass**%3A%20for%20gradients%20(see%20%5B03%5D(03_multipass_and_deformation.html)%2C%20%5Btest20_windef%5D(marimo_notebooks%2Ftest20_windef.html)).%0A%20%20%20%20-%20**Search%20area**%3A%20must%20cover%20maximum%20expected%20displacement.%0A%0A%20%20%20%20%23%23%20Validation%20%26%20post-processing%0A%20%20%20%20-%20Validate%20(s2n%2C%20median%2C%20range)%20before%20smoothing%20(see%20%5B04%5D(04_validation_and_filtering.html)).%0A%20%20%20%20-%20Mask%20objects%2Fboundaries%20(see%20%5B05%5D(05_masking_and_preprocessing.html)%2C%20%5Btest21%5D(marimo_cases%2Ftest21.html)).%0A%20%20%20%20-%20Replace%2Finterpolate%20outliers%20cautiously%3B%20report%20how%20many%20were%20invalid.%0A%0A%20%20%20%20%23%23%20Learn%20by%20example%20(feature%20%E2%86%92%20where%20to%20look)%0A%20%20%20%20%7C%20Feature%20%2F%20need%20%7C%20Example(s)%20%7C%20Insight%20%7C%0A%20%20%20%20%7C---%7C---%7C---%7C%0A%20%20%20%20%7C%20Basic%20workflow%20%7C%20%5Btutorial1%5D(marimo_notebooks%2Ftutorial1.html)%2C%20%5Btest1%5D(marimo_cases%2Ftest1.html)%20%7C%20Start%20simple%2C%20verify%20end-to-end%20%7C%0A%20%20%20%20%7C%20Many%20pairs%20%2F%20speed%20%7C%20%5Btutorial2%5D(marimo_notebooks%2Ftutorial2.html)%20%7C%20Multiprocessing%20%7C%0A%20%20%20%20%7C%20Multi-pass%20%26%20deformation%20%7C%20%5Btutorial_multipass%5D(marimo_notebooks%2Ftutorial_multipass.html)%2C%20%5Btest20_windef%5D(marimo_notebooks%2Ftest20_windef.html)%2C%20%5Bcase_B_windef_small_window%5D(marimo_notebooks%2Fcase_B_windef_small_window.html)%20%7C%20Resolve%20gradients%2C%20reduce%20bias%20%7C%0A%20%20%20%20%7C%20Correlation%20choices%20%7C%20%5Bcompare_correlations_algorithms%5D(marimo_notebooks%2Fcompare_correlations_algorithms.html)%2C%20%5Bstudying_correlations%5D(marimo_notebooks%2Fstudying_correlations.html)%20%7C%20Linear%20vs%20circular%2C%20normalized%20effects%20%7C%0A%20%20%20%20%7C%20Outlier%20detection%20%7C%20%5Bcompare_median_filters%5D(marimo_notebooks%2Fcompare_median_filters.html)%20%7C%20Normalized%20median%20is%20robust%20%7C%0A%20%20%20%20%7C%20Static%2Fdynamic%20masking%20%7C%20%5Bopenpiv_static_masking_example%5D(marimo_notebooks%2Fopenpiv_static_masking_example.html)%2C%20%5Bdynamic_masking%5D(marimo_notebooks%2Fdynamic_masking.html)%2C%20%5Btest21%5D(marimo_cases%2Ftest21.html)%20%7C%20Exclude%20non-flow%20regions%20%7C%0A%20%20%20%20%7C%20Preprocessing%20%7C%20%5Bpreprocessing_filters%5D(marimo_notebooks%2Fpreprocessing_filters.html)%20%7C%20Enhance%20contrast%2C%20remove%20background%20%7C%0A%20%20%20%20%7C%20Two-phase%20%2F%20separation%20%7C%20%5Bphase_separation%5D(marimo_notebooks%2Fphase_separation.html)%2C%20%5Btwo_phase_piv%5D(marimo_cases%2Ftwo_phase_piv.html)%20%7C%20Separate%20tracers%20from%20dispersed%20phase%20%7C%0A%20%20%20%20%7C%20Ensemble%2Fsteady%20flows%20%7C%20%5Bensemble_correlation%5D(marimo_notebooks%2Fensemble_correlation.html)%20%7C%20Average%20correlations%20for%20stationary%20stats%20%7C%0A%20%20%20%20%7C%203D%20PIV%20%7C%20%5BPIV_3D_example%5D(marimo_notebooks%2FPIV_3D_example.html)%2C%20%5Boutput_3D_test%5D(marimo_cases%2Foutput_3D_test.html)%20%7C%20Volumetric%20data%20workflows%20%7C%0A%20%20%20%20%7C%20Real-world%20cases%20%7C%20%5Btest9%5D(marimo_cases%2Ftest9.html)%20(K%C3%A1rm%C3%A1n)%2C%20%5Bopenpiv_bridgepile_wake%5D(marimo_notebooks%2Fopenpiv_bridgepile_wake.html)%2C%20%5Btest17%5D(marimo_cases%2Ftest17.html)%2C%20%5Bactive_nematics%5D(marimo_notebooks%2Factive_nematics.html)%20%7C%20Diverse%20flow%20phenomena%20%7C%0A%0A%20%20%20%20%23%23%20Common%20pitfalls%0A%20%20%20%20%7C%20Symptom%20%7C%20Likely%20cause%20%7C%20Try%20%7C%0A%20%20%20%20%7C---%7C---%7C---%7C%0A%20%20%20%20%7C%20Random%2Fnoisy%20vectors%20%7C%20Window%20too%20small%2C%20low%20seeding%2C%20wrong%20%24%5CDelta%20t%24%20%7C%20Larger%20window%2C%20better%20seeding%2C%20adjust%20%24%5CDelta%20t%24%20%7C%0A%20%20%20%20%7C%20Systematic%20bias%20%7C%20Peak-locking%2C%20poor%20subpixel%20fit%2C%20gradients%20%7C%20Better%20particle%20size%2C%20deformation%2C%20multi-pass%20%7C%0A%20%20%20%20%7C%20Missing%20vectors%20near%20objects%20%7C%20No%20mask%20%2F%20bad%20mask%20%7C%20Static%2Fdynamic%20masking%20%7C%0A%20%20%20%20%7C%20Over-smoothed%20field%20%7C%20Aggressive%20smoothing%20%7C%20Reduce%20smoothing%2C%20validate%20first%20%7C%0A%0A%20%20%20%20%23%23%20Reproducibility%0A%20%20%20%20-%20Save%20settings%20(e.g.%20%60PIVSettings%60%20to%20YAML)%2C%20record%20versions%2C%20and%20keep%20raw%20outputs.%0A%0A%20%20%20%20Explore%20all%3A%20%5BAll%20test%20cases%20%26%20notebooks%5D(all_cases.html)%20%C2%B7%20%5Bindex%5D(index.html)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
30aaa2e0e27e91a552bdd816ef9e6332