In this issue, we will create a file in CTModele.jl where we will write a function for smoothing a solution. For now, three methods will be available:
moving_average : Applies a simple centered moving average over a specified window size to smooth the data by averaging neighboring values.
selective_moving_average : Performs a moving average while selectively preserving outliers; values that differ too much from the local median are left unchanged to preserve sharp transitions.
smooth_with_splines : Fits a smoothing spline to the data, providing a continuous and differentiable approximation controlled by a smoothing factor.
The arguments of this function could be:
something(sol;window::Int=3, threshold::Float64=0.5, ratio::Float64=0.6, spline::Float64=0.4)
Afterward, I will compare the smoothed solution with the reference (perfect) solution using the L2 norm in a test file.
In this issue, we will create a file in
CTModele.jlwhere we will write a function for smoothing a solution. For now, three methods will be available:moving_average: Applies a simple centered moving average over a specified window size to smooth the data by averaging neighboring values.selective_moving_average: Performs a moving average while selectively preserving outliers; values that differ too much from the local median are left unchanged to preserve sharp transitions.smooth_with_splines: Fits a smoothing spline to the data, providing a continuous and differentiable approximation controlled by a smoothing factor.The arguments of this function could be:
something(sol;window::Int=3, threshold::Float64=0.5, ratio::Float64=0.6, spline::Float64=0.4)Afterward, I will compare the smoothed solution with the reference (perfect) solution using the L2 norm in a test file.