A .NET Framework 4.8 sample app (C# & VB.NET) built on AvocadoSmoothie.Barista, a deep‑dive running‑median smoothing and export toolkit (MiddleMedian / AllMedian, boundary modes, CSV / Excel workflows).
AvocadoSmoothie.Barista.Tasting is your tasting room : dial in the "recipe," iterate on parameters, and learn the library's behavior hands-on - so you can confidently brew your own production-ready data processing.
AvocadoSmoothie.Barista is a VB.NET / .NET library for robust running median smoothing and export utilities, designed to help you "craft" your data with the care of a skilled barista. The name "Barista" reflects the library's purpose : to blend, refine, and serve data with precision and clarity.
AvocadoSmoothie.Barista.Tasting is the companion sample application - a "tasting" session for your data.
In specialty coffee, tasting is where craft is born : you dial-in the recipe, learn the variables, and train your palate before serving the final cup.
This project is designed as that space for AvocadoSmoothie.Barista - a practical lab to test parameters, observe smoothing behavior, and understand boundary modes and export results with confidence.
Step into the tasting room, refine your technique, and ship your own full-scale application with a barista's certainty.
Initial release.
Updated sample code dependencies to the latest package versions.
This section describes how to use the AvocadoSmoothie.Barista library, as demonstrated in the AvocadoSmoothie.Barista.Tasting sample application (frmMain.cs and frmMain.Designer.cs).
Reference the AvocadoSmoothie.Barista library in your .NET Framework 4.8 project.
Input data should be a sequence of numbers (e.g., List<double>). The sample application allows you to paste or type values separated by spaces, commas, or line breaks into the "Initial Data" box.
The UI provides checkboxes for :
- All Median : Applies a fixed-size window with boundary handling.
- Middle Median : Preserves edge values using a variable-length window.
You can select one or both methods to apply.
Adjust parameters using the UI controls :
- Kernel Radius : Size of the smoothing window (R).
- Border Count : For Middle Median, number of edge values to preserve.
- Boundary Handling : Symmetric, Adaptive, Replicate, or ZeroPad (for All Median).
Click Start Smoothing to process the input. The results for each selected method are displayed in the "Refined Data" box.
// Compute AllMedian smoothing
var allMedian = SignatureMedian.ComputeMedians(
input : data,
useMiddle : false,
kernelWidth : windowWidth,
borderCount : borderCount,
progress : progressReporter,
boundaryMode : SignatureMedian.BoundaryMode.Symmetric
);
// Compute MiddleMedian smoothing
var middleMedian = SignatureMedian.ComputeMedians(
input : data,
useMiddle : true,
kernelWidth : windowWidth,
borderCount : borderCount,
progress : progressReporter
);- Export to CSV : Save results in a CSV file (with headers describing all parameters).
- Export to Excel : Save results in an Excel file (with worksheet headers and a line chart).
var ticket = new CsvOrderTicket
{
InitialData = data,
DatasetTitle = "My Dataset",
KernelRadius = radius,
BorderCount = borderCount,
BasePath = @"C :\path\to\output.csv",
Progress = progress,
CancellationToken = cancellationToken,
BoundaryMode = SignatureMedian.BoundaryMode.Symmetric
};
await CsvBrewService.ExportCsvAsync(ticket);var ticket = new ExcelOrderTicket
{
InitialData = data,
DatasetTitle = "My Dataset",
KernelRadius = radius,
BorderCount = borderCount,
Progress = progress,
CancellationToken = cancellationToken,
BoundaryMode = SignatureMedian.BoundaryMode.Symmetric
};
await ExcelBrewService.ExcelCustomOrder(ticket);Both export features include the original and all selected smoothing results in the output file.
For parameter details, see the doc/AvocadoSmoothie_API_Documentation.xml.
- Symmetric : Reflects data at the edges (default, smoothest).
- Adaptive : Slides the window fully inside the valid range (no synthetic samples).
- Replicate : Clamps to the nearest edge value.
- ZeroPad : Pads with zeros outside the range.
Select the desired mode in the UI or via the BoundaryMode parameter.
Add a reference to AvocadoSmoothie.Barista in your .NET Framework 4.8 project.
- See the doc/AvocadoSmoothie_API_Documentation.xml for full API details.
- Explore
FrmMain.csandFrmMain.Designer.csfor practical usage patterns and UI integration.
AvocadoSmoothie.Barista : Brew clarity from noisy data.
AvocadoSmoothie.Barista.Tasting : Taste, iterate, and dial in (fine-tune) your recipe.
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright ⓒ HappyBono 2025 - 2026. All Rights Reserved.