Skip to content

Commit 034609d

Browse files
authored
Merge pull request #324 from githubdoe/avg_with_slope
average profiles now get slope feature as well where slope is in orange.
2 parents c957ffb + 46f2c3d commit 034609d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

profileplot.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,17 @@ qDebug() << "Populate";
820820
left = transform.map(left);
821821
left.append(right);
822822

823-
QwtPlotCurve *cprofileavg = new QwtPlotCurve( name + " avg");
823+
ProfileCurve *cprofileavg = new ProfileCurve( name + " avg");
824+
if (left.size() >= 2) {
825+
// Distance between two samples
826+
double xDel = fabs(left[0].x() - left[1].x());
827+
828+
// Recalculate hDelLimit using this specific xDel
829+
double hDelLimit = m_showNm * m_showSurface * ((outputLambda/m_wf->lambda) * fabs(xDel * tan(arcsecLimit)) / (outputLambda * 1.e-6));
830+
831+
cprofileavg->setSlopeSettings(m_showSlopeError, hDelLimit, Settings2::m_profile->slopeErrorWidth());
832+
}
833+
824834
cprofileavg->setRenderHint( QwtPlotItem::RenderAntialiased );
825835
cprofileavg->setLegendAttribute( QwtPlotCurve::LegendShowSymbol, false );
826836
cprofileavg->setLegendIconSize(QSize(50,20));

0 commit comments

Comments
 (0)