diff --git a/mainwindow.cpp b/mainwindow.cpp index 758e184a..4f9b0c17 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1698,7 +1698,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered() int cnt = 0; QSettings set; QString lastPath = set.value("lastPath",".").toString(); - int memThreshold = set.value("lowMemoryThreshold",300).toInt(); + //int memThreshold = set.value("lowMemoryThreshold",300).toInt(); QImage img = m_ogl->m_surface->render(1000,1000); int width = img.width(); @@ -1796,7 +1796,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered() QApplication::setOverrideCursor(Qt::WaitCursor); QProcess *proc = new QProcess; connect(proc, QOverload::of(&QProcess::finished), - [=](int exitCode, QProcess::ExitStatus exitStatus){ qDebug() << "what" << exitStatus; }); + [=](int exitCode, QProcess::ExitStatus exitStatus){ qDebug() << "what" << exitStatus << "code" << exitCode; }); proc->setProcessChannelMode(QProcess::MergedChannels); proc->setWorkingDirectory(dir); diff --git a/percentcorrectiondlg.cpp b/percentcorrectiondlg.cpp index 6cfce724..7a581df0 100644 --- a/percentcorrectiondlg.cpp +++ b/percentcorrectiondlg.cpp @@ -201,10 +201,9 @@ void percentCorrectionDlg::makeZones(){ // the profile version needs the null removed and is in output lambda (usually 550); // zernike based does not need the null removed but needs to use laser wave length -double percentCorrectionDlg::getZernSurface( double RoC, double MirrorRad, std::vector Zernikes, double x, double null = 0., +double percentCorrectionDlg::getZernSurface( double RoC, double /*MirrorRad*/, std::vector Zernikes, double x, double null = 0., bool useavg = false){ - double num1 = x / MirrorRad; arma::rowvec rhov(1), thetav(1); rhov[0] = x/m_radius; thetav[0] = 0.; zernikeProcess zp; @@ -240,7 +239,7 @@ double percentCorrectionDlg::getZernSurface( double RoC, double MirrorRad, std:: else { // for each spherical term - int z = 8; + unsigned int z = 8; for(unsigned int j = 6; z < theZs.n_cols; j+=2){ val += Zernikes[z] * theZs(0,z); @@ -390,13 +389,12 @@ void percentCorrectionDlg::plotProfile(){ } QPolygonF profile2; // now plot the m_avg surface - int i = 0; for(double r = 0; r < m_avg.length(); r += 1. ){ // qDebug() << "r" << r << m_avg[i]; double y = m_avg[r].y();//getZernSurface(m_roc, m_radius, surfs[i]->zernvalues, fabs(r), true); - double sphery = m_roc - sqrt(pow(m_roc, 2.0) - pow(r, 2.0)); + //double sphery = m_roc - sqrt(pow(m_roc, 2.0) - pow(r, 2.0)); //y -= sphery; //y /= m_lambda_nm * .5E-6; profile2 << QPointF(m_avg[r].x(), y); diff --git a/profileplot.cpp b/profileplot.cpp index 39ef886e..17d2ed93 100644 --- a/profileplot.cpp +++ b/profileplot.cpp @@ -332,7 +332,7 @@ void ProfilePlot::setDefocusValue(double val){ m_plot->replot(); } } -QPolygonF ProfilePlot::createAverageProfile(double umnits, wavefront *wf, bool removeNull = false){ +QPolygonF ProfilePlot::createAverageProfile(double /*umnits*/, wavefront * /*wf*/, bool /*removeNull = false*/){ surfaceAnalysisTools *saTools = surfaceAnalysisTools::get_Instance(); QList list = saTools->SelectedWaveFronts(); QPolygonF avg; @@ -518,7 +518,7 @@ void ProfilePlot::populate() compass->setGeometry(QRect(80,80,70,70)); QString tmp("nanometers"); if (m_showNm == 1.) - tmp = QString().sprintf("waves of %6.1lf nm",outputLambda); + tmp = QString("waves of %1 nm").arg(outputLambda, 6, 'f', 1); m_plot->setAxisTitle( m_plot->yLeft, "Error in " + tmp ); m_plot->setAxisTitle( m_plot->xBottom, "Radius mm" ); @@ -536,7 +536,9 @@ void ProfilePlot::populate() if (m_wf->m_outside.m_radius > 0 && settings.value("GBlur", false).toBool()){ double val = .01 * (m_wf->diameter) * smoothing; - QString t = QString().sprintf("Surface Smoothing diameter %6.2lf%% of surface diameter %6.1lf mm", smoothing , val ); + QString t = QString("Surface Smoothing diameter %1% of surface diameter %2 mm") + .arg(smoothing, 6, 'f', 2) + .arg(val, 6, 'f', 1); QwtText title(t); title.setRenderFlags( Qt::AlignHCenter | Qt::AlignTop ); @@ -587,7 +589,6 @@ void ProfilePlot::populate() surfaceAnalysisTools *saTools = surfaceAnalysisTools::get_Instance(); QList list = saTools->SelectedWaveFronts(); - bool firstPlot = true; QColor penColor = QColor("blue"); for (int indx = 0; indx < list.size(); ++indx){ @@ -789,7 +790,6 @@ void ProfilePlot::contourPointSelected(const QPointF &pos){ double dely = pos.y() - m_wf->data.cols/2; double angle = atan2(delx,dely); // swaped x and y to rotate by 90 deg. - double angle2 = angle; const double twopi = M_PI * 2.; // force 0 to 360 if (angle < 0) @@ -806,11 +806,13 @@ void ProfilePlot::contourPointSelected(const QPointF &pos){ } void ProfilePlot::showCorrection(){ if (m_wf == 0) + { return; + } - m_pcdlg->show(); - m_pcdlg->raise(); - make_correction_graph(); + m_pcdlg->show(); + m_pcdlg->raise(); + make_correction_graph(); } diff --git a/zernikeprocess.cpp b/zernikeprocess.cpp index ecdba249..1ad0bfff 100644 --- a/zernikeprocess.cpp +++ b/zernikeprocess.cpp @@ -1366,7 +1366,7 @@ arma::mat zernikeProcess::zapmC(const arma::rowvec& rho, const arma::rowvec& the void zernikeProcess::initGrid(int width, double radius, double cx, double cy, int maxOrder, - double insideRad){ + double /*insideRad*/){ // if grid or maxOrder is different then update values. double obsPercent = 0.; diff --git a/zernikesmoothingdlg.cpp b/zernikesmoothingdlg.cpp index a3ecfddb..7b30443d 100644 --- a/zernikesmoothingdlg.cpp +++ b/zernikesmoothingdlg.cpp @@ -92,7 +92,6 @@ cv::Mat makeSurfaceFromZerns(int width, zernikeProcess &zp, std::vector } } else { // use only spherical terms. - unsigned int z = 0; for (unsigned long long i = 4; i < zp.m_zerns.n_rows; ++i){ double S1 = 0.0;