Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -1796,7 +1796,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
QApplication::setOverrideCursor(Qt::WaitCursor);
QProcess *proc = new QProcess;
connect(proc, QOverload<int, QProcess::ExitStatus>::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);
Expand Down
8 changes: 3 additions & 5 deletions percentcorrectiondlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double> Zernikes, double x, double null = 0.,
double percentCorrectionDlg::getZernSurface( double RoC, double /*MirrorRad*/, std::vector<double> 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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 10 additions & 8 deletions profileplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
zoomed = false;
m_defocus_mode = false;
m_plot = new QwtPlot(this);
profilePlotPicker *picker = new profilePlotPicker(m_plot);

Check warning on line 78 in profileplot.cpp

View workflow job for this annotation

GitHub Actions / build-linux (ubuntu-22.04)

unused variable ‘picker’ [-Wunused-variable]

Check warning on line 78 in profileplot.cpp

View workflow job for this annotation

GitHub Actions / build-linux (ubuntu-24.04)

unused variable ‘picker’ [-Wunused-variable]

Check warning on line 78 in profileplot.cpp

View workflow job for this annotation

GitHub Actions / build-DFTFringe

unused variable 'picker' [-Wunused-variable]
type = 0;
QHBoxLayout * l1 = new QHBoxLayout();
QVBoxLayout *v1 = new QVBoxLayout();
Expand Down Expand Up @@ -332,7 +332,7 @@
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<int> list = saTools->SelectedWaveFronts();
QPolygonF avg;
Expand Down Expand Up @@ -518,7 +518,7 @@
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" );

Expand All @@ -536,7 +536,9 @@

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 );

Expand Down Expand Up @@ -587,7 +589,6 @@

surfaceAnalysisTools *saTools = surfaceAnalysisTools::get_Instance();
QList<int> list = saTools->SelectedWaveFronts();
bool firstPlot = true;
QColor penColor = QColor("blue");

for (int indx = 0; indx < list.size(); ++indx){
Expand Down Expand Up @@ -789,7 +790,6 @@
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)
Expand All @@ -806,11 +806,13 @@
}
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();


}
2 changes: 1 addition & 1 deletion zernikeprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.;
Expand Down
1 change: 0 additions & 1 deletion zernikesmoothingdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ cv::Mat makeSurfaceFromZerns(int width, zernikeProcess &zp, std::vector<double>
}
}
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;
Expand Down
Loading