{"id":28717187,"url":"https://github.com/jgmotta98/pyterp","last_synced_at":"2025-06-15T03:13:53.632Z","repository":{"id":298040307,"uuid":"998649737","full_name":"jgmotta98/PyTerp","owner":"jgmotta98","description":"A high-performance Python library for parallel k-NN search and IDW on scattered data, powered by a C++ core.","archived":false,"fork":false,"pushed_at":"2025-06-09T03:52:51.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-09T04:36:39.045Z","etag":null,"topics":["cpp","idw","interpolation","knn","nanoflann"],"latest_commit_sha":null,"homepage":"","language":"C++","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/jgmotta98.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,"zenodo":null}},"created_at":"2025-06-09T03:05:20.000Z","updated_at":"2025-06-09T03:52:55.000Z","dependencies_parsed_at":"2025-06-09T04:36:41.811Z","dependency_job_id":"bc1789d6-6bb1-4529-91da-c4b2c8c21665","html_url":"https://github.com/jgmotta98/PyTerp","commit_stats":null,"previous_names":["jgmotta98/pyterp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jgmotta98/PyTerp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmotta98%2FPyTerp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmotta98%2FPyTerp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmotta98%2FPyTerp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmotta98%2FPyTerp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgmotta98","download_url":"https://codeload.github.com/jgmotta98/PyTerp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmotta98%2FPyTerp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914931,"owners_count":22931334,"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":["cpp","idw","interpolation","knn","nanoflann"],"created_at":"2025-06-15T03:13:37.306Z","updated_at":"2025-06-15T03:13:53.607Z","avatar_url":"https://github.com/jgmotta98.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTerp\n\nA 3D interpolator for **Python** designed for maximum speed on large datasets. It accelerates the IDW algorithm with a parallelized C++ core (`OpenMP`) and optimized k-NN searches (`nanoflann`).\n\n## Theoretical Summary\n\nThe interpolation is performed in a two-step process that combines the k-NN and IDW algorithms.\n\n1. **Neighbor Selection (k-NN)**: For each point where a value is to be estimated, the _k-Nearest Neighbors_ algorithm first finds the k closest known source points in space. The efficiency of this search is ensured by an optimized data structure (`k-d tree`).\n\n2. **Value Calculation (IDW)**: Next, the _Inverse Distance Weighting_ method calculates the final value as a weighted average of the k found neighbors. The weight of each neighbor is inversely proportional to its distance (weight = 1/distanceᵖ, where `p` is a power parameter), causing closer points to have a much greater influence on the result.\n\n## Prerequisites\n\nBefore you begin, ensure you have the following software installed:\n\n* **Python 3.10+**\n* **Git**\n* **A C++ compiler**: This package contains C++ code that needs to be compiled during installation.\n    * **Windows**: Install Visual Studio Build Tools (select the \"Desktop development with C++\" workload).\n    * **Linux (Debian/Ubuntu)**: Install build-essential with: sudo apt-get install build-essential.\n\n## Installation\n\n### PyPI\n\n#### Install the package:\n\n```bash\npip install pyterp\n```\n\n---\n\n### GitHub\n\n#### 1. Clone the repository:\n\n```bash\ngit clone https://github.com/jgmotta98/PyTerp.git\ncd PyTerp\n```\n\n#### 2. Create and activate a virtual environment:\n\n```bash\n# Create the environment\npython -m venv .venv\n\n# Activate the environment\n# On Windows (cmd.exe):\n.venv\\Scripts\\activate\n# On macOS/Linux (bash/zsh):\nsource .venv/bin/activate\n```\n\n#### 3. Install the requirements:\n\n```bash\npip install -r requirements.txt\n```\n\n#### 4. Install the package:\n\n```bash\npip install .\n```\n\n## Usage Example\n\nFor a complete and runnable example, including the creation and preparation of input data, please see the scripts in the [examples](examples/basic_usage.py) folder.\n\n## Acknowledgements\n\nThis project uses `nanoflann`, a high-performance C++ library for the _k-Nearest Neighbors_ algorithm. The efficiency of nanoflann's k-d tree implementation is fundamental to this interpolator's performance.\n\n* **Official Repository:** [Nanoflann](https://github.com/jlblancoc/nanoflann)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgmotta98%2Fpyterp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgmotta98%2Fpyterp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgmotta98%2Fpyterp/lists"}