{"id":13395775,"url":"https://github.com/MattEdwards94/AdaptivePIV","last_synced_at":"2025-03-13T22:31:03.404Z","repository":{"id":216976392,"uuid":"173333460","full_name":"MattEdwards94/AdaptivePIV","owner":"MattEdwards94","description":"Developing PIV codes in Python","archived":false,"fork":false,"pushed_at":"2023-07-06T21:53:09.000Z","size":80583,"stargazers_count":6,"open_issues_count":30,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-17T13:31:30.362Z","etag":null,"topics":["particle-image-velocimetry"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MattEdwards94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-01T16:24:09.000Z","updated_at":"2024-05-30T07:12:40.918Z","dependencies_parsed_at":null,"dependency_job_id":"a16446d4-a487-4249-a568-1061f7f782ef","html_url":"https://github.com/MattEdwards94/AdaptivePIV","commit_stats":null,"previous_names":["mattedwards94/adaptivepiv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattEdwards94%2FAdaptivePIV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattEdwards94%2FAdaptivePIV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattEdwards94%2FAdaptivePIV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattEdwards94%2FAdaptivePIV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MattEdwards94","download_url":"https://codeload.github.com/MattEdwards94/AdaptivePIV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493291,"owners_count":20299624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["particle-image-velocimetry"],"created_at":"2024-07-30T18:00:31.588Z","updated_at":"2025-03-13T22:31:03.397Z","avatar_url":"https://github.com/MattEdwards94.png","language":"Python","funding_links":[],"categories":["3. PIV analysis"],"sub_categories":[],"readme":"# AdaptivePIV\nThis repository is for the analysis of PIV images using adaptive PIV image analysis approaches\n\n## pre-requisites\nIt is assumed that you have python set up on your machine already. If that is not the case, then look [here](https://www.python.org/about/gettingstarted/) to get started.\nBefore installing AdaptivePIV, you will require a Python 3.7 environment with numpy installed. During installation a number of other packages will be installed - see below.\n\nI would strongly recommend to use a virtual environment for this:\n\n    python -m venv env_name\n    env_name\\Scripts\\activate.bat\n\nOr\n\n    conda create -n env_name python=3.7\n    conda activate env_name\n\nWhere in both cases `env_name` represents the name of the virtual environment. For more information see [Python virtual environments](https://docs.python.org/3/tutorial/venv.html) or [Conda virtual environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).\n\nNumpy is trivially installed using\n\n    pip install numpy\nor\n    \n    conda install numpy\n\n**NOTE** While `numpy` is required to _install_ the package, a number of other packages are required to _run_ the code. These will be automatically installed when installing the PIV package. The installed packages are:\n\n- scipy\n- h5py\n- pillow\n- sklearn\n- scikit-image\n- matplotlib\n- bottleneck\n\n## Installation\nCheckout the repository using  \n\n    git clone https://github.com/MattEdwards94/AdaptivePIV.git\n\nThere are 2 options to install AdaptivePIV:\n\n### Installing a static version of the package\nTo install a static version, the distributable must first be built. \n\n    python setup.py sdist\nThis will build a `tar.gz` file under the sub-directory `dist\\`\nInstalling the package and it's dependencies is then achieved via:\n\n    pip install --upgrade dist\\PIV-x.x.tar.gz\nWhere `x.x` is the version number being installed.\n\n### Installing in developer mode\nAlternatively, the package can be installed in developer mode. In doing so, changes to the source code are automatically reflected when running the code without having to rebuild (Note that you will likely have to restart the Python interpreter)\n\n    pip install -e .\n\n### Using Cython\nThe python package `Cython` is used in this repository to accelerate certain aspects of the cross-correlation analysis.\nFiles with the ending `.pyx` are `cythonized` into an equivalent C code which is built when the package is installed.   \nThis C code is shipped with the repository and therefore the `.pyx` should not need building again.   \nIf you would like to modify these Cython files then you must first install Cython:\n\n    pip install cython  / conda install cython\n\nFollowing this, the package will need rebuilding with an additional flag:\n\n    python setup.py sdist --cyth True\n\n### Known installation issues\nFor some unknown reason, installing the 3rd party package `pillow` from the `conda` repository results in tiff files being unable to be opened. This is resolved by installing the package using `pip`. A similar issue is encountered when installing jupyter using conda - I suspect that there is a dependency issue somewhere along the chain. \n\n## Usage\nIncluded in this repository are two example PIV image pairs taken from an experiment of the flow over a backwards facing step.\nThe function `experimental_example(im_number=1, settings=None)` in the file `example.py` will analyse one of these pairs. Options for `im_number` are `1`(default) and `20`.   \nIf no settings are passed to this function, the following pre-configured defaults will be adopted:\n\n    WidimSettings(init_WS=97,\n                  final_WS=33,\n                  WOR=0.5,\n                  n_iter_main=3,\n                  n_iter_ref=1,\n                  vec_val='NMT',\n                  interp='struc_cub')\n\nThere are two ways to see this function in action. Calling `python example.py` will run both the experimental example and the synthetic example (below) one after another. Alternatively, to just run one, launch a `python` session from within the `AdaptivePIV` directory and `import example`, followed by running the desired function `example.experimental_example()` or `example.synthetic_example()`.\n\nIf you would like to play about with the various settings, run `help(PIV.analysis.WidimSettings.__init__)` (with `PIV` imported) to see what each value can accept.\n\nThe `synthetic_example(settings=None)` shows how artificial images can be created and further analysed. By creating these artificial images, novel algorithms can be tested and validated against the known underlying displacement field.   \nThe displacement field used in this example is of a non-physical contra rotating vortex array.  \nAs above, this can either be seen by running the entire file `python example.py` or by importing `example` as a module and running `example.synthetic_example()`\n\n## Contact details\nIf you have any issues with the above steps, or questions about the PIV analysis algorithm, please feel free to email me at [m.edwards@bristol.ac.uk](mailto:m.edwards@bristol.ac.uk).  \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMattEdwards94%2FAdaptivePIV","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMattEdwards94%2FAdaptivePIV","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMattEdwards94%2FAdaptivePIV/lists"}