{"id":29858089,"url":"https://github.com/happybono/avocadosmoothie","last_synced_at":"2026-02-10T01:03:00.265Z","repository":{"id":306211638,"uuid":"1024141534","full_name":"happybono/AvocadoSmoothie","owner":"happybono","description":"VB.NET project for running-median filtering. Users set kernel radius, border count, and pick MiddleMedian or AllMedian. Processing runs in parallel with a progress bar and smooth UI.","archived":false,"fork":false,"pushed_at":"2026-02-09T13:13:47.000Z","size":81947,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-09T18:25:35.791Z","etag":null,"topics":["algorithms","calibration","correction","data-analysis","median","outliers","quicksort","running-median","runningmedian","smoothing","smoothing-methods","statistics","visual-basic"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/AvocadoSmoothie.Barista","language":"Visual Basic .NET","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/happybono.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-22T08:44:38.000Z","updated_at":"2026-02-09T13:13:51.000Z","dependencies_parsed_at":"2025-09-10T16:28:26.696Z","dependency_job_id":null,"html_url":"https://github.com/happybono/AvocadoSmoothie","commit_stats":null,"previous_names":["happybono/avocadosmoothie"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/happybono/AvocadoSmoothie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happybono%2FAvocadoSmoothie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happybono%2FAvocadoSmoothie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happybono%2FAvocadoSmoothie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happybono%2FAvocadoSmoothie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/happybono","download_url":"https://codeload.github.com/happybono/AvocadoSmoothie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/happybono%2FAvocadoSmoothie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29287726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["algorithms","calibration","correction","data-analysis","median","outliers","quicksort","running-median","runningmedian","smoothing","smoothing-methods","statistics","visual-basic"],"created_at":"2025-07-30T01:22:18.461Z","updated_at":"2026-02-10T01:03:00.247Z","avatar_url":"https://github.com/happybono.png","language":"Visual Basic .NET","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AvocadoSmoothie\n## The Art of Data Refinement That Preserves Only the Core\n**AvocadoSmoothie** captures the essence of nature's avocado and the softness of a smoothie. Built on the running median algorithm, this project carefully extracts true signals from noisy data : just as only the pit remains at the center of a ripe avocado, leaving behind rough skins and excess in the blender.\n\n**Key components**\n- **Avocado** : Symbolizes a careful approach that targets only the central values of data, much like the dense seed hidden deep inside the fruit.\u003cbr\u003e\n- **Smoothie** : Represents the graceful flow of an algorithm that blends complexity into a seamless whole, just like diverse ingredients harmonizing into one smooth drink.\n\n**Technical Aesthetics**\n- **RunningMedian** : Delivers stability and reliability by maintaining the central tendency, even in the face of abrupt spikes.\n\n**Philosophical Foundation**\n- **Gentle Refinement**\u003cbr\u003e\nLike living organisms, data requires delicate care. AvocadoSmoothie follows a soft-touch philosophy to ensure vital patterns aren't damaged by excessive processing.\n\n- **Harmony Between Responsiveness and Stability**\u003cbr\u003e\nLike a well-balanced smoothie in taste and texture, this project aims to respond swiftly while also withstanding sudden fluctuations.\n\n- **Clarity Through Vitality**\u003cbr\u003e\nBy removing noise, AvocadoSmoothie breathes clarity and energy into your analysis : leading to better decisions and deeper insights, all through a nutritious blending process.\n\n## Project Overview\nThis AvocadoSmoothie project delivers a highly optimized running median filter on numeric data held in a `ListBox`. Users pick a `kernel radius` and `border count`, then choose between two modes :\u003cbr\u003e\u003cbr\u003e\n\nAvocadoSmoothie now supports configurable boundary handling during full-range smoothing : \u003cbr\u003e\u003cbr\u003e\n\n- **AllMedian (Full Median)** : Applies the median filter at every index using a fixed kernel of width (2 × radius + 1). Out-of-range indices are synthesized according to the selected Boundary Mode (Symmetric reflection, Replicate, Zero Padding, or Adaptive). Adaptive mode shortens to a contiguous in-bounds window when the full kernel would extend past edges.\u003cbr\u003e\n\n- **MiddleMedian** : Preserves the first and last Border Count items verbatim and applies the same windowed median only to the interior region. Boundary modes are not applied because the preserved edges eliminate the need for synthetic padding.\u003cbr\u003e\u003cbr\u003e\n\nThread-local window buffers, `Parallel.For`, and an allocation-minimized median routine deliver high throughput. A unified `ComputeMedians` method orchestrates both modes.\u003cbr\u003e\u003cbr\u003e\n\nData can be entered one value at a time, bulk-pasted from the clipboard, or drag-and-dropped (with HTML-aware parsing). Internally, each sliding window is copied into a thread-local buffer and its median is obtained by Array.Sort on a temporary slice (legacy Quicksort remains in code but is not used on the median path). Filtering is parallelized across CPU cores using `Parallel.For` for maximum throughput.\u003cbr\u003e\u003cbr\u003e\nA real-time ProgressBar keeps the user informed, and UI updates (copy, delete, select-all, paste) are batched with `BeginUpdate` / `EndUpdate` to eliminate flicker. After each run, source and result lists are reset to guarantee repeatable behavior, making it effortless to visualize noise reduction or signal smoothing on the fly.\u003cbr\u003e\u003cbr\u003e\n\n\u003e [!Important]\n\u003e This implementation uses a plain (equal-weight) median filter. For weighted-median calculations and a wider range of smoothing / correction methods, please refer to the **[SonataSmooth](https://github.com/happybono/SonataSmooth)** project. \n\n### Boundary Modes\n| Mode | Behavior | Use Case |\n|------|----------|----------|\n| Symmetric | Mirrors indices past edges (reflective) | Smooth continuity at boundaries |\n| Replicate | Clamps to nearest valid endpoint | Preserves plateaus / avoids mirror artifacts |\n| Zero Padding | Treats out-of-range as 0.0 | Emphasize contrast; dampen edge influence |\n| Adaptive | Crops the window so it stays fully within the dataset (effective W = min(kernelSize, n)) | Best for small datasets; avoids synthetic values by using only real data |\n\n#### Index Mapping Examples\n| Index (outside) | Symmetric            | Replicate        | Zero Padding | Adaptive                                |\n|-----------------|----------------------|------------------|--------------|-----------------------------------------|\n| -1              | maps to 1 (mirror)  | maps to 0        | 0.0          | Window cropped; out-of-range excluded   |\n| n               | maps to n - 2       | maps to n - 1    | 0.0          | Window cropped; out-of-range excluded   |\n\n\nImplementation details :\n- Non-Adaptive modes always build a full kernel-size window, synthesizing each out-of-range slot via `GetValueWithBoundary`.\nAdaptive computes the median over a contiguous in‑bounds slice:\n  - start = clamp(i - offsetLow, 0, n - W)\n  - W = min(kernelSize, n)\n\n## Use Cases\nAvocadoSmoothie is specialized for **1D numerical data smoothing and noise reduction**.  \nAlthough limited to single‑dimension datasets, it can be applied in many domains where sequential numeric signals require pre-processing or refinement.\n\n### 1. Machine Learning / Deep Learning Pre-processing\n- **Problem** : Training datasets often contain spikes, jitter, or irregular noise.  \n- **Solution** : Running Median filtering removes abrupt outliers while preserving meaningful patterns.  \n- **Impact** : Improves model stability, reduces overfitting, and enhances generalization.\n\n### 2. IoT \u0026 Sensor Data Stabilization\n- **Problem** : Sensor outputs (temperature, vibration, humidity, etc.) are prone to random fluctuations.  \n- **Solution** : Adaptive boundary handling ensures smooth results even with small datasets.  \n- **Impact** : More reliable monitoring and higher accuracy in anomaly detection.\n\n### 3. Financial \u0026 Economic Time Series\n- **Problem** : Stock prices, exchange rates, and transaction volumes show high short‑term volatility.  \n- **Solution** : Median filtering dampens extreme spikes while retaining long‑term trends.  \n- **Impact** : Provides stable input for forecasting models and improves simulation reliability.\n\n### 4. Scientific \u0026 Experimental Measurements\n- **Problem** : Laboratory and field data often suffer from instrument noise or environmental interference.  \n- **Solution** : Symmetric reflection and MiddleMedian modes refine data without distorting edge values.  \n- **Impact** : Enables clearer pattern detection and strengthens research validity.\n\n### 5. Audio / Signal Processing (1D only)\n- **Problem** : Single‑channel signals or audio waveforms are vulnerable to peak noise.  \n- **Solution** : Running Median removes salt‑and‑pepper style noise while preserving essential features.  \n- **Impact** : Enhances post‑processing quality and improves signal analysis accuracy.\n\n### 6. Data Visualization \u0026 Reporting\n- **Problem** : Noisy datasets produce cluttered and misleading charts.  \n- **Solution** : Median smoothing generates cleaner curves and more interpretable plots.  \n- **Impact** : Delivers clearer insights and supports better decision‑making in reports.\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"GitHub Last Commit\" src=\"https://img.shields.io/github/last-commit/happybono/AvocadoSmoothie\"\u003e \n\u003cimg alt=\"GitHub Repo Size\" src=\"https://img.shields.io/github/repo-size/happybono/AvocadoSmoothie\"\u003e\n\u003cimg alt=\"GitHub Repo Languages\" src=\"https://img.shields.io/github/languages/count/happybono/AvocadoSmoothie\"\u003e\n\u003cimg alt=\"GitHub Top Languages\" src=\"https://img.shields.io/github/languages/top/happybono/AvocadoSmoothie\"\u003e\n\u003cimg alt=\"Nuget Downloads\" src=\"https://img.shields.io/nuget/dt/AvocadoSmoothie.Barista?logo=nuget\u0026link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FAvocadoSmoothie.Barista%2F\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n## What's New\n\u003cdetails\u003e\n\u003csummary\u003eClick to Expand\u003c/summary\u003e\n\n### v1.0.0.0\n#### February 16, 2022\n\u003e Initial release.\n\n#### February 17, 2022\n\u003e Fixed several bugs.\n\n#### March 06, 2022\n\u003e Hi-DPI monitors support.\n\n### v2.0.0.0\n#### July 20, 2025\n\u003e Overhauled the graphical user interface.\u003cbr\u003e\u003cbr\u003e\n\u003e Configurable `kernel width` and `border count` (combo‐boxes).\u003cbr\u003e\u003cbr\u003e\n\u003e Regex utilities for numeric / HTML parsing.\u003cbr\u003e\u003cbr\u003e\n\u003e Progress reporting via `ProgressBar` and `IProgress(Of Integer)`.\u003cbr\u003e\u003cbr\u003e\n\u003e Async UI integration (`Async / Await` + `Task.Run`).\u003cbr\u003e\u003cbr\u003e\n\u003e Thread‐local buffers and parallel loops (`Parallel.For`).\u003cbr\u003e\u003cbr\u003e\n\u003e Replaced hard‐coded 5-point windows with parameterized `ComputeMedians`.\u003cbr\u003e\u003cbr\u003e\n\u003e Switched from single‐threaded loops to `Parallel.For`.\u003cbr\u003e\u003cbr\u003e\n\u003e Unified median logic : introduced `GetWindowMedian` with `Array.Sort`.\u003cbr\u003e\u003cbr\u003e\n\u003e Bulk result population with `ListBox.Items.AddRange`.\u003cbr\u003e\u003cbr\u003e\n\u003e Selection handlers to enable / disable edit, copy, delete and clear buttons.\u003cbr\u003e\u003cbr\u003e\n\u003e Fully non-blocking median computation.\u003cbr\u003e\u003cbr\u003e\n\u003e Dynamic window size reduces overhead.\u003cbr\u003e\u003cbr\u003e\n\u003e Real‐time progress feedback (`ProgressBar`).\u003cbr\u003e\u003cbr\u003e\n\u003e `StatusStrip` shows mode, `kernel width` and `border count`.\n\n### v2.1.1.0\n#### July 21, 2025\n\u003e Updated copy behavior : even when items aren't fully selected, pressing the copy button or using the shortcut (Ctrl + C) will copy all entries.\u003cbr\u003e\n(If only some items in the `ListBox` are selected, only those selected items will be copied.)\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v2.1.2.0\n#### July 22, 2025\n\u003e Improved bulk deletion performance in ListBox by optimizing the deletion logic for full selection scenarios.\u003cbr\u003e\u003cbr\u003e\n\u003e Added a fast path to instantly clear all items and reset the progress bar when all entries are selected.\u003cbr\u003e\u003cbr\u003e\n\u003e Ensured the progress bar and UI remain responsive during partial deletions of large datasets.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v2.2.3.0\n#### July 22, 2025\n\u003e Refactored the btnInitPaste_Click handler to use PLINQ-based parallel parsing.\u003cbr\u003e\u003cbr\u003e\n\u003e Optimized bulk insertion by replacing per-item adds with lbInitData.Items.AddRange.\u003cbr\u003e\u003cbr\u003e\n\u003e Removed Task.Yield calls to eliminate unnecessary context switches.\u003cbr\u003e\u003cbr\u003e\n\u003e Updated progress bar steps to 0 → 10 → 30 → 70 → 100 for clearer feedback.\u003cbr\u003e\u003cbr\u003e\n\u003e Added enable / disable logic for Calculate, Copy, and Delete buttons to boost UI responsiveness and overall performance.\n\n### v3.0.0.0\n#### July 25, 2025\n\u003e Renamed all code elements, file names, and app metadata to reflect the new project name.\u003cbr\u003e\u003cbr\u003e\n\u003e The project has been rebranded under its distinctive new name.\u003cbr\u003e\u003cbr\u003e\n\u003e A new GitHub repository named AvocadoSmoothie has been created, and all necessary files have been relocated to it\u003cbr\u003e\u003cbr\u003e\n\u003e The existing [RunningMedian](https://github.com/happybono/RunningMedian/) repository has been set to private.\n\n### v3.1.0.0\n#### July 25, 2025\n\u003e Replaced unsafe Val() parsing with Double.TryParse() to prevent overflow and ensure robust input validation.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v4.0.0.0\n#### August 03, 2025\n\u003e Added `FrmAbout` displaying app version and copyright information.\u003cbr\u003e\u003cbr\u003e\n\u003e Added `Buy Me a Coffee` feature via PayPal, integrated directly into the `FrmAbout` to support the developer.\u003cbr\u003e\u003cbr\u003e\n\n### v4.2.3.0\n#### August 03, 2025\n\u003e Minor bugs fixed.\n\n### v4.2.3.2\n#### August 05, 2025\n\u003e Minor bugs fixed.\n\n### v4.2.6.7\n#### August 10, 2025\n\u003e The code has been refactored, and variable names have been redefined for improved clarity.\u003cbr\u003e\u003cbr\u003e\n\u003e Include an ARM64-native variant of the executable.\n\n### v4.2.7.0\n#### August 15, 2025\n\u003e Updated UI labels by replacing \"Kernel Width\" with the more precise \"Kernel Radius\".\u003cbr\u003e\u003cbr\u003e\n\u003e Refactored variable names and code references to use \"Kernel Radius (r)\" instead of \"Kernel Width (w)\".\u003cbr\u003e\u003cbr\u003e\n\u003e Removed unnecessary `Task.Yield` calls to eliminate extra context switches and improve execution efficiency.\u003cbr\u003e\u003cbr\u003e\n\u003e Improved Microsoft Office (Excel) installation detection and exception handling robustness.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v4.3.0.0\n#### August 20, 2025\n\u003e Implemented explicit COM object cleanup (`Application`, `Workbook`, `Worksheet`) with `Marshal.ReleaseComObject` and forced GC to prevent memory leaks and lingering background Excel processes.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v4.3.1.0\n#### August 21, 2025\n\u003e Removed unused functions to streamline the codebase.\u003cbr\u003e\u003cbr\u003e\n\u003e Retained early-stage/draft code as commented-out sections for reference and potential future use.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n \n### v4.6.3.8\n#### August 24, 2025  \n\u003e Renamed UI controls for clarity and consistency (e.g., `ListBox1` → `lbInitData`).\u003cbr\u003e\u003cbr\u003e\n\u003e Added dynamic description label (`slblDesc`) and tooltip support for better user guidance.\u003cbr\u003e\u003cbr\u003e\n\u003e Deprecated `MiddleMedian()` and `AllMedian()` functions; replaced with unified `ComputeMedians()` logic.\u003cbr\u003e\u003cbr\u003e\n\u003e Enhanced Excel export with metadata (title, author, comments) and fun flavor-based messages.\u003cbr\u003e\u003cbr\u003e\n\u003e Improved error handling for Excel export (COM errors, permission issues, etc.).\u003cbr\u003e\u003cbr\u003e\n\u003e Unified progress bar usage (`pbMain`) across calibration and export processes.\u003cbr\u003e\u003cbr\u003e\n\u003e Improved selection synchronization and feedback between datasets.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v4.6.3.9\n#### August 26, 2025\n\u003e Refreshed the graphical user interface with subtle enhancements.\u003cbr\u003e\u003cbr\u003e\n\u003e Improved status label messaging logic : Added dynamic singular / plural phrasing and corrected punctuation for clearer user feedback.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v4.6.5.0\n#### August 28, 2025\n\u003e\tImplemented dataset title validation : including checks for length, invalid characters, and reserved names. Alongside dynamic placeholder behavior and conditional enabling of the export button.\n\n### v4.6.5.1\n#### September 2, 2025\n\u003e Minor bugs fixed.\n\n### v4.6.6.0\n#### September 7, 2025\n\u003e With the transition to ARM64 native based on `.NET Framework 4.8.1`, PCs running in this environment now deliver improved performance.\u003cbr\u003e\u003cbr\u003e\n\u003e Since version `v4.6.3.8`, the correction value miscalculated when selecting the MiddleMedian method has been fixed to calculate correctly.\n\n### v5.0.0.0\n#### November 8, 2025\n\u003e Added boundary handling options : `Symmetric` (Mirror), `Adaptive`, `Replicate` (Nearest), `Zero Padding`.\u003cbr\u003e\u003cbr\u003e\n\u003e Extended `ComputeMedians` to integrate boundary synthesis for AllMedian mode; introduced `BoundaryMode` enum and `GetValueWithBoundary` for edge sampling.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bug fixes, performance improvements, and user interface enhancements.\n\n### v5.0.1.0\n#### November 9, 2025\n\u003e Revised and updated `README.md` documentation.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n### v5.1.2.0\n#### November 15, 2025\n\u003e `StatusBar` now shows `Boundary Handling` options when using `All Median` mode.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n \n### v5.1.3.0\n#### November 16, 2025\n\u003e Minor bugs fixed.\n \n### v5.2.0.0  \n#### December 01, 2025  \n\u003e Newly introduced `.slnx` format : enhanced scalability and compatibility compared to the traditional `.sln`, supporting large‑scale project management and multi‑platform build environments.\u003cbr\u003e\u003cbr\u003e\n\u003e Motivation : to maintain a consistent project structure across diverse runtime / plugin environments and minimize format conflicts during team collaboration.\u003cbr\u003e\u003cbr\u003e \n\u003e Purpose : to unify solution definitions under a single format, improving maintenance efficiency and enabling smoother integration with future automation pipelines and cloud workflows.\n\n### v5.3.0.0\n#### December 15, 2025\n\u003e Application preferences are now automatically saved when the `AvocadoSmoothie` application closes. These values are seamlessly reloaded at startup, allowing users to continue their work without interruption and ensuring a consistent environment across sessions.\u003cbr\u003e\u003cbr\u003e\n\u003e CSV export UX improved : progress bar switches to marquee while the Save dialog is open.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\u003c/details\u003e\n\n### v5.4.0.0\n#### December 23, 2025\n\u003e Improved Excel export error handling : now distinguishes between Excel not installed, COM activation failure, and other interop errors, providing more specific user guidance.\u003cbr\u003e\u003cbr\u003e\n\u003e Minor bugs fixed.\n\n## Required Components \u0026 Setup\n### Prerequisites\n- Windows Operating System \n  - [**Windows 11**](https://www.microsoft.com/en-us/d/windows-11-home/dg7gmgf0krt0?msockid=3c879b53720a6995028b8dcc732368c0) recommended, compatible with Windows 10\n- [.NET Framework 4.8](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48) or [.NET Framework 4.8.1](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net481)\n  - Runtime : .NET Framework 4.8.1 (native ARM64 supported on Windows 11)\n  - Architectures : ARM64 (native), x64 (native), x86 (native)\n  - Verified on ARM64 and x64 devices (native builds)\n  - Note : Any native dependencies (P / Invoke / COM) require ARM64 builds\n\n- [Visual Studio 2026](https://visualstudio.microsoft.com/) (for development)\n  - Development environment is recommended to use **Visual Studio 2022 or newer**\n- [Microsoft Office (Excel)](https://www.microsoft.com/en/microsoft-365/)\n  - Excel 2013 Service Pack 1 (clean install) verified to work without additional configuration.\n  - Later versions (Excel 2016, 2019, 2021, 2024, Microsoft 365) also confirmed stable.\n  - Minimum recommended version : **Excel 2019 or later** for long-term support and reliability.\n  - Bitness must match : **x86 app with 32‑bit Office, or x64 app with 64‑bit** Office.\n  - CSV export does not require Microsoft Office.\n\n### Dependencies\n- `System.Windows.Forms`\n- `System.Threading.Tasks`\n- `System.Linq`\n- `Microsoft.Office.Interop.Excel` (for Excel export)\n\n### Initial Setup\n- Clone or download the repository.\n- Open the solution file (`.sln`) in Visual Studio.\n- Add necessary references if required.\n- Build the project.\n- Run the application.\n\n## Execution Instructions\n1. **Launch the Application** : Run the compiled `.exe` file or start the project from Visual Studio.\n2. **Input Data** : Enter numeric values manually, paste from clipboard, or drag-and-drop text / HTML.\n3. **Select Filter** : Choose a smoothing algorithm and configure kernel radius and border count.\n4. **Calibrate** : Click the 'Calibrate' button to apply the selected filter.\n5. **Review Results** : View the smoothed output in the second listbox.\n6. **Export** : Click Export to save results as `.CSV` or `Excel (.xlsx)`, with optional chart visualization.\n\n## Pascal Weighted Median vs. Standard Median\n### Which Types of Graphs Benefit from Each Method?\n| Graph Type              | Standard Median      | Pascal Weighted Median    |\n|:------------------------|:---------------------|:--------------------------|\n| Occasional Noise        | Effective            | Effective                 |\n| Frequent Noise          | Strong filtering     | Sensitive to distortions  |\n| High local variation    | Can suppress trends  | Captures trends well      |\n| Sudden spikes           | Ignores outliers well| May amplify outliers      |\n\n- The **standard median** is great for filtering noise in data with frequent or unpredictable spikes : such as images or sensor readings.\n- The **Pascal theory based weighted median** shines when the data has meaningful local structure, like time series that need trend preservation.\n\n### Why Is the Pascal Triangle Weighted Median More Sensitive to Noise?\nA **Pascal triangle-based weighted median** assigns weights to each element : typically giving higher weight to values near the center of the window.\n\n- Advantage : Better preserves local trends within the data.\n- Downside : Noisy spikes near the center get too much influence, leading to distortion.\n\nIn comparison:\n- A **[standard median](https://github.com/happybono/AvocadoSmoothie/)** simply picks the middle value, so random spikes are more easily ignored.\n- A **[weighted median](https://github.com/happybono/SonataSmooth/)**, especially with Pascal-style weights, might over-represent noisy points if they're close to the center.\n\n### Which Method Is Commonly Used in Practice?\nDepending on the field, practitioners choose based on context :\n\n- Image processing / video filtering\n  - Standard median is widely used\n  - Removes salt-and-pepper noise effectively\n\n- Time-series smoothing (e.g. stock prices, IoT sensors, EEG signals)\n  - Weighted approaches, including Pascal triangle, are preferred\n  - Smooths data while preserving trends\n\n- Experimental data correction\n  - Often combines both methods\n  - Hybrid strategies handle complex noise patterns more flexibly\n\n## Features\n- Import numeric data effortlessly via copy / paste or drag-and-drop from Excel and other spreadsheet apps (HTML / text parsing built-in).\n- Choose kernel radius and border count, then click the `Calibrate` button to apply the running median filter.\n- Two filter modes : **MiddleMedian** (preserve first / last values) or **AllMedian** (full-range smoothing).\n- High-performance parallel processing with a thread-local buffer and `Array.Sort`-based median selection (`GetWindowMedian`).\n- Real-time `ProgressBar` feedback and flicker-free UI updates using `BeginUpdate` / `EndUpdate.`\n- Source and result lists reset after each run for consistent, repeatable behavior.\n\n## Features \u0026 Algorithms\n### 1. Initialization \u0026 Input Processing\n#### How it works\nWhen the application starts, users can input numeric data through various methods : direct text entry, clipboard paste, or drag-and-drop. The input values are parsed and stored in the internal initList, and displayed in lbInitData for review and editing.\n\n#### Principle\n-\tInput data is added to `lbInitData` and internally stored in the initList list.\n-\tInput can be received via the textbox, clipboard, or drag-and-drop.\n-\tOnly numeric values are extracted using regular expressions for robust parsing.\n\n#### Code Implementation\n```vbnet\n' Add value from TextBox\nPrivate Sub btnInitAdd_Click(sender As Object, e As EventArgs) Handles btnInitAdd.Click\n    Dim v As Double\n    If Double.TryParse(txtInitAdd.Text, v) Then\n        lbInitData.Items.Add(v)\n        lblInitCnt.Text = $\"Count : {lbInitData.Items.Count}\"\n    End If\n    txtInitAdd.Clear()\nEnd Sub\n\n' Paste from clipboard (parallel parse)\nPrivate Async Sub btnInitPaste_Click(sender As Object, e As EventArgs) Handles btnInitPaste.Click\n    Dim text As String = Clipboard.GetText()\n    Dim matches = regexNumbers.Matches(text).Cast(Of Match)().Where(Function(m) m.Value \u003c\u003e \"\").ToArray()\n    Dim values As Double() = Await Task.Run(Function()\n        Return matches.AsParallel().\n            WithDegreeOfParallelism(Environment.ProcessorCount).\n            Select(Function(m) Double.Parse(m.Value, Globalization.NumberStyles.Any, Globalization.CultureInfo.InvariantCulture)).\n            ToArray()\n    End Function)\n    If values.Length = 0 Then Return\n    lbInitData.BeginUpdate()\n    lbInitData.Items.AddRange(values.Cast(Of Object).ToArray())\n    lbInitData.EndUpdate()\n    lblInitCnt.Text = $\"Count : {lbInitData.Items.Count}\"\nEnd Sub\n\n' Drag \u0026 drop (HTML aware)\nPrivate Async Sub lbInitData_DragDrop(sender As Object, e As DragEventArgs) Handles lbInitData.DragDrop\n    Dim raw As String = If(e.Data.GetDataPresent(\"HTML Format\"),\n                           regexStripTags.Replace(e.Data.GetData(\"HTML Format\").ToString(), \"\"),\n                           e.Data.GetData(DataFormats.Text).ToString())\n    Dim parsed As Double() = Await Task.Run(Function()\n        Return regexNumbers.Matches(raw).\n            Cast(Of Match)().\n            AsParallel().AsOrdered().\n            Select(Function(m)\n                       Dim tok = m.Value.Replace(\",\", \"\").Trim()\n                       Dim d As Double\n                       Return If(Double.TryParse(tok, Globalization.NumberStyles.Any, Globalization.CultureInfo.InvariantCulture, d), d, Double.NaN)\n                   End Function).\n            Where(Function(d) Not Double.IsNaN(d)).\n            ToArray()\n    End Function)\n    If parsed.Length = 0 Then Return\n    lbInitData.BeginUpdate()\n    lbInitData.Items.AddRange(parsed.Cast(Of Object).ToArray())\n    lbInitData.EndUpdate()\n    lblInitCnt.Text = $\"Count : {lbInitData.Items.Count}\"\nEnd Sub\n```\n\n### 2. What is Kernel Radius\n#### Definition\nIn a median filter, `kernelRadius` specifies how many elements are taken on each side of the center element when creating the median window.\n  \n#### Kernel Size Formula\nThe width of a kernel is calculated using the following formula :\n\n$$\n\\text{kernelWidth} = 2 \\times \\text{kernelRadius} + 1\n$$\n\n#### Example\nIf the kernel radius is **2**, then :\n\n$$\n\\text{kernelWidth} = 2 \\times 2 + 1 = 5\n$$\n\nTherefore, the kernel width (computed from the radius) is **5**.\n\n#### Meaning\n- The filter includes the current element plus `kernelRadius` elements before it and after it.\n- This ensures the total window size is always odd, so there's a single middle value.\n\n#### Benefit\n- `kernelRadius` makes it easy to reason about how far to extend the filter around the center point.\n- It helps in handling edge conditions without ambiguity.\n\n### 3. AllMedian Calculation\n#### How it works\nFor each index i, a window of size (2 × radius + 1) is populated. Out-of-range positions are resolved via the selected Boundary Mode (except Adaptive, which shortens the window). Parallel threads reuse thread-local buffers to avoid allocations.\n\n#### Principle\n1. Compute offsets :\n   offsetLow = (kernelSize - 1) \\ 2\n   offsetHigh = (kernelSize - 1) - offsetLow\n2. If boundaryMode = Adaptive :\n   - W = min(kernelSize, n)\n   - Determine a valid contiguous start\n   - Copy W in-bounds values\n3. Else :\n   - For each relative position k :\n     win[k] = GetValueWithBoundary(arr, i + k - offsetLow, boundaryMode)\n4. Median = GetWindowMedian(win, effectiveLength)\n\n#### Key Distinction\nEdge indices no longer \"shrink\" by clamping; synthetic sampling abstracts the boundary so every window (except Adaptive) stays full-sized.\n\n#### Code Implementation\n```vbnet\n' All-points median smoothing example (boundary mode explicitly provided)\nComputeMedians(useMiddle:=False,\n               kernelSize:=2 * radius + 1,\n               borderCount:=0,\n               progress:=progress,\n               boundaryMode:=BoundaryMode.Symmetric)\n\nPrivate Sub ComputeMedians(useMiddle As Boolean,\n                           kernelSize As Integer,\n                           borderCount As Integer,\n                           progress As IProgress(Of Integer),\n                           Optional boundaryMode As BoundaryMode = BoundaryMode.Symmetric)\n    Dim n = initList.Count\n    If n = 0 Then progress.Report(0) : Return\n\n    Dim arr = initList.ToArray()\n    Dim buffer(n - 1) As Double\n    Dim offsetLow  = (kernelSize - 1) \\ 2\n    Dim offsetHigh = (kernelSize - 1) - offsetLow\n\n    ' Thread-local buffer to avoid per-iteration allocations\n    Dim localWin As New ThreadLocal(Of Double())(\n        Function() New Double(KernelSize - 1) {})\n\n    Parallel.For(0, n, Sub(i)\n        Dim win = localWin.Value\n        If boundaryMode = BoundaryMode.Adaptive Then\n            Dim desiredW As Integer = kernelSize\n            Dim W As Integer = Math.Min(desiredW, n)\n            Dim start As Integer = i - offsetLow\n            If start \u003c 0 Then start = 0\n            If start \u003e n - W Then start = n - W\n            For pos As Integer = 0 To W - 1\n                win(pos) = arr(start + pos)\n            Next\n            buffer(i) = GetWindowMedian(win, W)\n        Else\n            For pos As Integer = 0 To kernelSize - 1\n                Dim k As Integer = pos - offsetLow\n                win(pos) = GetValueWithBoundary(arr, i + k, boundaryMode)\n            Next\n            buffer(i) = GetWindowMedian(win, kernelSize)\n        End If\n    End Sub)\n\n    refinedList.Clear()\n    refinedList.AddRange(buffer)\nEnd Sub\n\nPrivate Function GetWindowMedian(win() As Double, length As Integer) As Double\n    Dim slice = win.Take(length).ToArray()\n    Array.Sort(slice)\n    Dim mid = length \\ 2\n\n    If length Mod 2 = 0 Then\n        ' even → average two middle elements\n        Return (slice(mid - 1) + slice(mid)) / 2.0\n    Else\n        Return slice(mid)\n    End If\nEnd Function\n```\n\n### 4. MiddleMedian Calculation\n#### How it works\nMiddleMedian preserves the first and last `borderCount` elements unchanged, then applies the same median filter only to the inner region. It calls the **same** `ComputeMedians` routine with `useMiddle:=True`.\n\n#### Principle\nCopy boundary elements directly :\nbuffer(0 … borderCount - 1) = arr(0 … borderCount - 1)\nbuffer(n - 1 … n - borderCount) = arr(n - 1 … n - borderCount)\nRun the sliding-window median on indices [borderCount … n - borderCount - 1]\nFiltering logic and median selection are identical to `AllMedian`\n\n#### Code Implementation\n```vbnet\nComputeMedians(useMiddle:=True,\n               kernelSize:=2 * radius + 1,\n               borderCount:=borderCount,\n               progress:=progress)\n\n' Inside ComputeMedians (simplified):\nIf useMiddle Then\n    For i = 0 To borderCount - 1\n        buffer(i) = arr(i)\n        buffer(n - 1 - i) = arr(n - 1 - i)\n    Next\nEnd If\n\nstartIdx = borderCount\nendIdx   = n - borderCount - 1\n\nParallel.For(startIdx, endIdx + 1, Sub(i)\n    ' Legacy edge behavior: variable effective length near borders\n    Dim iMin = Math.Max(0, i - offsetLow)\n    Dim iMax = Math.Min(n - 1, i + offsetHigh)\n    Dim length = iMax - iMin + 1\n    Dim win = localWin.Value\n    For k = 0 To length - 1\n        win(k) = arr(iMin + k)\n    Next\n    buffer(i) = GetWindowMedian(win, length)\nEnd Sub)\n```\n\n### 5. Border Count\nWhen you apply the Running Median filter, the **Border Count** parameter lets you exempt a fixed number of points at each end of your series from filtering. This helps you avoid unwanted edge distortion and preserves known \"safe\" values at the start and finish.\n\n- Definition  \n  The number of data points to leave unchanged at both the beginning and the end of the sequence.\n\n- Type  \n  Integer, 0 ≤ Border Count \u003c ⌊n / 2⌋\n\n- Default  \n  0 (no edge preservation : all points are filtered)\n\n#### Notes\n\n- If your series length is less than 2 × Border Count, the filter will skip processing entirely.  \n- Choose a small k (e.g. 1 - 5) when you trust your edge data but still need robust spike suppression in the center.\n\n#### Behavior\n\nIf you set `Border Count = k`, then :  \n- The first **k** samples remain exactly as they are.  \n- The last **k** samples remain exactly as they are.  \n- Only the middle section (everything between those preserved edges) is passed through the median filter.\n\n#### Example\n\n```txt\nOriginal data (10 points) :   [x₀, x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉]\nBorder Count = 3\n\nPreserved by Border Count :   [x₀, x₁, x₂]                [x₇, x₈, x₉]\nFiltered by Running Median :              [x₃, x₄, x₅, x₆]\n```\n\n### Enhanced Parameter Validation \u0026 Single-Display Error Gating\n`ValidateSmoothingParametersCanonical` builds a radius-derived window size and enforces:\n- windowSize ≤ dataCount\n- borderCount ≤ dataCount\n- (Middle mode) 2 × borderCount \u003c windowSize\n\nErrors use standardized builders :\n- BuildParamErrorWindowTooLarge\n- BuildParamErrorBorderTooLarge\n- BuildParamErrorBorderWidth\n\nDuplicate dialog spam is prevented with `MessageOnceGate`, allowing the same message only once within a timed interval.\n\nRules Summary :\n- windowSize = (2 × radius) + 1\n- Middle mode border width = 2 × borderCount\n- Require : windowSize ≤ dataCount AND borderCount ≤ dataCount AND (Middle) 2 × borderCount \u003c windowSize\n\n### Dataset Title Validation\nTitles must:\n- Be non-empty (placeholder replaced on first edit)\n- ≤ 31 characters\n- Exclude : \\ / ? * [ ] and any Windows invalid filename chars\n- Avoid reserved names (CON, PRN, AUX, NUL, COM1 - COM9, LPT1 - LPT9)\n\nOn invalid input :\n- Title reverts to placeholder\n- A single warning dialog appears (duplicate suppression via internal gating).\n\n### Results Aggregation \u0026 UI Update\n#### How it works\nOnce `ComputeMedians` completes on a background thread, the UI thread :\nClears and repopulates `lbRefinedData` in one batch\nScrolls `lbRefinedData` so the last element is visible\nUpdates count labels, summary labels, and button states\nShows a brief 200 ms delay before resetting the progress bar to 0\n\n#### Principle\n- Repopulate lbRefinedData using AddRange(refinedList)\n- Set lbRefinedData.TopIndex to the last item index\n- Update :\n    - `lblInitCnt` and `lblRefCnt` with total and refined counts\n    - `slblCalibratedType` to \"Middle Median\" or \"All Median\"\n    - `slblKernelRadius` with the chosen radius\n    - `slblBorderCount` with the border count (visible only in middle‐median mode)\n  - Toggle visibility of `slblBorderCount`, `tlblBorderCount` and `slblSeparator2` based on mode\n  - Refresh button states via `UpdatelbInitDataButtonsState` and `UpdatelbRefinedDataButtonsState`\n  - Delay 200 ms to let users see \"100% complete\", then reset `pbMain.Value`\n\n#### Code Implementation\n```vbnet\nPrivate Async Sub btnCalibrate_Click(sender As Object, e As EventArgs) Handles btnCalibrate.Click\n    ' ... prepare initList, parameters, and pbMain\n    \n    Await Task.Run(Sub()\n        ' kernelWidth = 2 * radius + 1\n        ComputeMedians(useMiddle, kernelWidth, borderCount, progress,\n                       If(useMiddle, BoundaryMode.Symmetric, GetSelectedBoundaryMode()))\n    End Sub)\n\n    ' Refresh lbRefinedData\n    lbRefinedData.BeginUpdate()\n    lbRefinedData.Items.Clear()\n    lbRefinedData.Items.AddRange(refinedList.Cast(Of Object).ToArray())\n    lbRefinedData.EndUpdate()\n\n    ' Scroll to last item\n    lbRefinedData.TopIndex = lbRefinedData.Items.Count - 1\n\n    ' Update count labels\n    lblInitCnt.Text = $\"Count : {total}\"\n    lblRefCnt.Text = $\"Count : {refinedList.Count}\"\n\n    ' Update summary labels\n    slblCalibratedType.Text = If(useMiddle, \"Middle Median\", \"All Median\")\n    slblKernelRadius.Text = Integer.Parse(cbxKernelRadius.Text)\n    slblBorderCount.Text = $\"{borderCount}\"\n\n    ' Toggle visibility of border‐related labels\n    slblBorderCount.Visible = useMiddle\n    tlblBorderCount.Visible = useMiddle\n    slblSeparator2.Visible = useMiddle\n\n    ' Refresh UI button states\n    UpdatelbInitDataButtonsState(Nothing, EventArgs.Empty)\n    UpdatelbRefinedDataButtonsState(Nothing, EventArgs.Empty)\n\n    ' Brief UX pause, then reset progress bar\n    Await Task.Delay(200)\n    pbMain.Value = 0\nEnd Sub\n```\n\n### Implementation Details\n#### Input Handling\n- Manual Entry  \n  The `btnInitAdd_Click` handler and `txtInitAdd_KeyDown` allow users to type a numeric value into `txtInitAdd` and press Enter or click Add. Valid numbers are parsed via `Double.TryParse` and appended to `lbInitData`.\n  \n- Clipboard Paste  \n  The `btnInitPaste_Click` event reads `Clipboard.GetText()`, uses `regexNumbers` to match numeric tokens, then parses them in parallel (`AsParallel().WithDegreeOfParallelism`) before adding to `lbInitData` in a batch (`BeginUpdate` / `EndUpdate`).\n\n- Drag \u0026 Drop  \n  The `lbInitData_DragDrop` handler checks for \"HTML Format\" or plain text, strips tags via `regexStripTags`, extracts numbers via `regexNumbers.Matches`, parses in a background task, and calls `AddItemsInBatches` to insert items with incremental progress.\n\n- Regex-Based Filtering  \n  Two compiled regexes are used :  \n  - `regexStripTags` to remove HTML / XML tags.  \n  - `regexNumbers` to find `\"[+-]?(\\\\d+(,\\\\d{3})*|(?=\\\\.\\\\d))((\\\\.\\\\d+([eE][+-]\\\\d+)?)|)\"` and extract numeric substrings.\n\n#### Smoothing Workflow\nWhen the user clicks **Calibrate** (`btnCalibrate_Click`) :\n\n1. Convert each lbInitData.Items entry to Double and store in initList.\n2. Read cbxKernelRadius (radius) and compute kernelWidth = (2 × radius) + 1.\n3. Read cbxBorderCount and parse borderCount.\n4. Validate parameters with ValidateSmoothingParametersCanonical(n, radius, borderCount, useMiddle).\n5. Initialize pbMain and create Progress(Of Integer) to update it.\n6. Run ComputeMedians(useMiddle, kernelWidth, borderCount, progress,\n   If(useMiddle, BoundaryMode.Symmetric, GetSelectedBoundaryMode())) on the thread pool.\n7. Populate lbRefinedData with refinedList, update labels (lblInitCnt, lblRefCnt, slblCalibratedType, slblKernelRadius, slblBorderCount), then reset pbMain.\n\n#### Filter Algorithm Implementation\n##### Core Routine : ComputeMedians\n- Middle-Median (`useMiddle = True)` Copies the first and last `borderCount` points unmodified to buffer. Applies a sliding window of width `KernelRadius` only to indices [borderCount … n - borderCount - 1].\n\n- All-Median (`useMiddle = False`) Applies the sliding window at every index using boundary synthesis to keep a full fixed-size window (Symmetric / Replicate / Zero Padding); Adaptive crops to a contiguous in-bounds window.\n\nBoth modes share :\n1. A thread-local window buffer (ThreadLocal(Of Double())) to avoid per-iteration allocations.\n2. A Parallel.For loop distributing indices across CPU cores.\n3. Median selection via GetWindowMedian : Array.Sort a slice; odd → middle element, even → average of two middles.\n\nEdge handling differs :\n- MiddleMedian (useMiddle = True) : copies preserved borders; interior windows use clamped iMin / iMax (variable length).\n- AllMedian (useMiddle = False) : builds a full fixed-size window using BoundaryMode synthesis (Symmetric, Replicate, Zero Padding). With Adaptive, it crops to a contiguous in-bounds window of size W = min(kernelSize, n).\n\n##### Core Median Functions  \n- `GetWindowMedian(win() As Double, length As Integer)` Creates a temporary slice of length elements from win, sorts with Array.Sort, and returns :\n    - `slice(mid)` if `length` is odd\n    - `(slice(mid - 1) + slice(mid)) / 2.0` if even\n- `Quicksort(list() As Double, min As Integer, max As Integer)` remains in the codebase but is no longer used by ComputeMedians.\n \n#### Parallel Processing \u0026 UI Responsiveness\n- Median computation leverages `Parallel.For` with thread-local buffers.\n- Text parsing uses PLINQ (`.AsParallel().WithDegreeOfParallelism(Environment.ProcessorCount)`).\n- Progress updates flow through `IProgress(Of Integer)` into `pbMain`.\n- `BeginUpdate` / `EndUpdate` on both listboxes prevent repaint flicker.\n- Background work is offloaded via `Task.Run` / `Await`; small `Task.Delay(1)` calls within batch routines yield to the UI thread.\n- Deletion and selection routines use `Application.DoEvents()` to process pending Windows messages during lengthy operations.\n\n#### Legacy Quicksort\nInternally, each sliding window is copied into a thread-local buffer and its median is extracted using Array.Sort over a temporary slice. A legacy Quicksort implementation remains in code for reference but is not used on the median path.\n\n#### Export Functionality\n##### General Export Settings\n- Choose format via `rbtnCSV` or `rbtnXLSX`.\n- `cbxKernelRadius` and `cbxBorderCount` must parse to valid integers before export.\n- Dataset title is taken from `txtDatasetTitle` (placeholder is shown until edited).\n\n##### CSV Export (`ExportCsvAsync`)\n- Loads initial data from `lbInitData` into a `Double()` array.\n- Computes both series : MiddleMedian (`ComputeMedians(True, …)`) and AllMedian (`ComputeMedians(False, …)`).\n- Splits output into multiple files when rows exceed Excel’s 1,048,576 limit (reserving 12 header lines).\n- Writes UTF-8 CSV with :\n  - Title\n  - Part X of Y\n  - Smoothing parameters (Kernel Radius, Kernel Width, Border Count, Boundary Method)\n  - Timestamp\n  - Header line : `Initial Data,Middle Median,All Median`\n- Robustness :\n  - Retry loop on `IOException` (file in use) with Retry / Cancel.\n  - Auto-opens each generated file; falls back to `rundll32 shell32.dll,OpenAs_RunDLL` if no association.\n\n##### Excel Export (`btnExport_Click` with `rbtnXLSX`)\n- Validates and reads parameters and initial data, then computes MiddleMedian and AllMedian.\n- Creates Excel `Application` → `Workbook` → first `Worksheet`.\n- Writes sheet header :\n  - A1 : dataset title\n  - Row 3 : \"Smoothing Parameters\"\n  - Rows 4 - 7 : Kernel Radius, Kernel Width, Border Count, Boundary Method\n- Writes data with `WriteDistributed` :\n  - Splits each series across adjacent columns when exceeding 1,048,576 rows per column.\n- Visualization :\n  - Inserts a line chart (`xlLine`) with three series (Initial, Middle Median, All Median), titled and labeled axes.\n- Document metadata :\n  - Built-in properties (Title, Category, Subject, Author, Last Author, Keywords, Comments).\n  - Flavor-themed comments with \"achievement\" tiers by dataset size.\n- Cleanup :\n  - Explicit COM release via a stack and `Marshal.FinalReleaseComObject`.\n  - Double GC pass to avoid lingering Excel processes.\n  - Makes Excel visible and enables alerts.\n \n#### Keyboard Shortcuts\n- Ctrl + C - Copy selected or all items to clipboard (Initial and Refined).\n- Ctrl + V - Paste numeric data into Initial dataset.\n- Ctrl + A - Select all items (Initial and Refined).\n- Delete - Delete selected items in Initial dataset.\n- Ctrl + Delete - Clear all items (Initial → Initial dataset, Refined → Refined dataset).\n- F2 - Edit selected item(s) (FrmModify) in Initial dataset.\n- Esc - Deselect selection (Initial and Refined).\n\n### Data Handling and Processing\n- Efficiently processes numeric data for running median calculations\n- Supports data input via :\n  - Direct entry\n  - Clipboard paste\n  - Drag-and-drop\n- Validates numeric values using regular expressions\n- Stores data as a list of doubles for high-precision calculations\n- Provides two types of running median filters :\n  - All Median :\n    - Calculates a median at every position using a sliding window\n    - Uses Boundary Modes (Symmetric / Replicate / Zero Padding) for synthetic edge sampling; Adaptive crops the window in-bounds\n  - Middle Median :\n    - Applies the median filter only to interior indices\n    - Preserves a user-defined number of edge elements (border count) unchanged\n\n### User Interface and Interaction\n- Main window includes :\n  - `ListBox` for input data\n  - `ListBox` for displaying results\n- Data points can be :\n  - Added, edited, or deleted via buttons or keyboard shortcuts\n- Bulk editing supported via modal dialog for multi-value modification\n- Data selection, copying, and clearing available via one-click or keyboard shortcuts\n- Real-time feedback provided through `ProgressBars` and `StatusLabels`\n- Interface dynamically enables / disables controls based on context to prevent errors\n\n### Customization and Configuration\n- Kernel radius adjustable for filtering (kernel width = 2 × radius + 1)\n- Boundary exclusion configurable when using MiddleMedian\n- Filter type (`AllMedian` or `MiddleMedian`) can be switched using radio buttons\n- Interface auto-adjusts available settings to match selected filter\n- All settings applied instantly for immediate data visualization and experimentation\n\n### Contextual UX Enhancements\n- Dynamic status label (`slblDesc`) with singular / plural grammar and contextual verbs.\n- Tooltip-like hover behavior implemented through event handlers rather than static ToolTip control.\n- Selection synchronization buttons (`btnInitSelectSync`, `btnRefSelectSync`) mirror selected indices across datasets.\n- ProgressBar reused uniformly for paste, drag-drop, deletion, selection-all, calibration, and export for consistent user mental model.\n\n## Conclusion\nAvocadoSmoothie delivers a seamless, high-performance Windows Forms experience for running median calculations on numeric datasets. It combines flexible data ingestion (manual entry, clipboard paste, drag-and-drop) with two smoothing modes : Middle Median (preserving edge values) and All Median (adaptive windowing) : to transform noisy signals into clear, consistent outputs.\n\nKey highlights :\n- Robust border handling that avoids edge artifacts without dropping data points.\n- Multithreaded execution via `Parallel.For`, PLINQ and asynchronous UI updates for maximum throughput.\n- Real-time progress reporting and flicker-free batch rendering to keep users informed and the interface smooth.\n- Flexible export options : split CSV files for very large datasets or full-featured Excel workbooks with automatic chart generation.\n\nTogether, these features empower users to interactively refine their data, fine-tune smoothing parameters, and export polished results : making AvocadoSmoothie a reliable, efficient component in any data-analysis or preprocessing workflow.  \n\n## Principle Demonstration\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://vimeo.com/693794659\" title=\"Data Calibration Demo Using the running median Method - Click to Watch\"\u003e\n    \u003cimg src=\"https://videoapi-muybridge.vimeocdn.com/animated-thumbnails/image/2dbb2e91-d9c1-4799-beea-9b1e6a9e6a85.gif?ClientID=vimeo-core-prod\u0026Date=1648603639\u0026Signature=a785b7936ee37beb6a0e010ae71a8215ae16bdf9\" alt=\"Data Calibration Demo Using the running median Method.\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## Demonstration\n![AvocadoSmoothie-AllMedian](Screenshots/AvocadoSmoothie-AllMedian.png)\u003cbr\u003e\u003cbr\u003e\n![AvocadoSmoothie-MiddleMedian](Screenshots/AvocadoSmoothie-MiddleMedian.png)\u003cbr\u003e\u003cbr\u003e\n![AvocadoSmoothie-EditEntries](Screenshots/AvocadoSmoothie-EditEntries.png)\u003cbr\u003e\u003cbr\u003e\n![AvocadoSmoothie-MatchSelection](Screenshots/AvocadoSmoothie-MatchSelection.png)\u003cbr\u003e\u003cbr\u003e\n![Calibrated Results](Screenshots/Before_and_After_Smoothing_with_Avocado_Smoothie.png)\n\n## License\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n## Copyright \nCopyright ⓒ HappyBono 2022 - 2026. All Rights Reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhappybono%2Favocadosmoothie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhappybono%2Favocadosmoothie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhappybono%2Favocadosmoothie/lists"}