From 46f2c3dc7425ae87c6ea6394784f9510b9d37d4c Mon Sep 17 00:00:00 2001 From: gr5 Date: Thu, 8 Jan 2026 16:51:12 -0500 Subject: [PATCH] average profiles now get slope feature as well where slope is in orange. --- profileplot.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/profileplot.cpp b/profileplot.cpp index ce1a7e57..7866119a 100644 --- a/profileplot.cpp +++ b/profileplot.cpp @@ -820,7 +820,17 @@ qDebug() << "Populate"; left = transform.map(left); left.append(right); - QwtPlotCurve *cprofileavg = new QwtPlotCurve( name + " avg"); + ProfileCurve *cprofileavg = new ProfileCurve( name + " avg"); + if (left.size() >= 2) { + // Distance between two samples + double xDel = fabs(left[0].x() - left[1].x()); + + // Recalculate hDelLimit using this specific xDel + double hDelLimit = m_showNm * m_showSurface * ((outputLambda/m_wf->lambda) * fabs(xDel * tan(arcsecLimit)) / (outputLambda * 1.e-6)); + + cprofileavg->setSlopeSettings(m_showSlopeError, hDelLimit, Settings2::m_profile->slopeErrorWidth()); + } + cprofileavg->setRenderHint( QwtPlotItem::RenderAntialiased ); cprofileavg->setLegendAttribute( QwtPlotCurve::LegendShowSymbol, false ); cprofileavg->setLegendIconSize(QSize(50,20));