Skip to main content

plot_results

Function plot_results 

Source
pub async fn plot_results(
    config: &PlotConfig,
    optimized_params: &[f64],
    input_curve: &Curve,
    target_curve: &Curve,
    deviation_curve: &Curve,
    cea2034_curves: &Option<HashMap<String, Curve>>,
    output_path: &Path,
) -> Result<(), Box<dyn Error>>
Expand description

Generate and save an HTML plot comparing the input curve with the optimized EQ response.

§Arguments

  • args - The list of args from the command line
  • input_curve - The original frequency response curve
  • smoothed_curve - Optional smoothed inverted target curve
  • target_curve - The target curve
  • optimized_params - The optimized filter parameters
  • output_path - The path to save the HTML output file
  • cea2034_curves - Optional CEA2034 curves to include in the plot
  • eq_response - Optional EQ response to include in the plot

§Returns

  • Result indicating success or failure