Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7aa9354
updated make movie of wave fronts
githubdoe Oct 10, 2024
4b2e8aa
added percent correction feature to profile
githubdoe Oct 14, 2024
12165b6
updating with master changes
githubdoe Oct 14, 2024
0ce3740
update DFTFringe.pro to add percentcorrectiondlg class
githubdoe Oct 14, 2024
a21649e
lenhanced percentage correction. Added save and restore variables to…
githubdoe Oct 15, 2024
614cdb4
removed short cut from view menu to percentage
githubdoe Oct 16, 2024
4b9a3f1
reworked actual and expected. Have working percentage
githubdoe Oct 21, 2024
5fb2bec
corrected 16 diameter but. Work in progress on percent correction. …
githubdoe Nov 11, 2024
446a48d
changed to use only first 4 spherical terms. Work in progress
githubdoe Feb 16, 2025
7a4a33c
reworked percentages to use many spherical terms. Working but want t…
githubdoe Feb 27, 2025
ffdc477
Perhaps done except for cleanup.
githubdoe Mar 5, 2025
4b8e2fc
profile and zernike based percentages. Profile is not the same but i…
githubdoe Mar 20, 2025
4c1982c
cleaned up percent completion to only use Zernike terms. Added hot k…
githubdoe Apr 6, 2025
e7041ae
Added help for % correction. Added load wave fronts from multiple di…
githubdoe Apr 8, 2025
cf07f1d
changed default Foucault ROC to be last value used. Enabled tool tip…
githubdoe Apr 16, 2025
24b50c1
corrected bug where surface error was not set back to 1x when changin…
githubdoe Apr 16, 2025
4dbe664
corrected bug in make wave front movie so that frames get numbered co…
githubdoe Apr 20, 2025
4631671
Changed test stand removal code to create a better countour plot on p…
githubdoe Apr 21, 2025
8ca70f5
corrected bugs George pointed out. Added info to revision history
githubdoe May 3, 2025
98b1823
updated revision history
githubdoe May 3, 2025
2de1bf0
added show astig polar graph
githubdoe May 8, 2025
00b5042
corrrected typo on header to polar plot. Changed how selecting a pro…
githubdoe May 13, 2025
eb414c6
updated revision history .html
githubdoe May 13, 2025
48b45d7
added wheel event to scale profile and contour plots. Change polar p…
githubdoe May 14, 2025
4358b49
update project version number and added more revision history entries.
githubdoe May 14, 2025
b8a73e2
Merge branch 'master' into dalework
githubdoe May 14, 2025
5357951
Fixed project file
gr5 May 14, 2025
487e0a8
Merge branch 'master' into dalework
gr5 May 14, 2025
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
15 changes: 15 additions & 0 deletions DFTFringe.pro
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ SOURCES += SingleApplication/singleapplication.cpp \
annulushelpdlg.cpp \
arbitrarywavefronthelp.cpp \
arbitrarywavwidget.cpp \
astigpolargraph.cpp \
astigscatterplot.cpp \
astigstatsdlg.cpp \
astigzoomer.cpp \
Expand Down Expand Up @@ -181,6 +182,7 @@ SOURCES += SingleApplication/singleapplication.cpp \
gplus.cpp \
graphicsutilities.cpp \
helpdlg.cpp \
hotkeysdlg.cpp \
igramarea.cpp \
igramintensity.cpp \
imagehisto.cpp \
Expand All @@ -204,9 +206,11 @@ SOURCES += SingleApplication/singleapplication.cpp \
outlineplots.cpp \
outlinestatsdlg.cpp \
pdfcalibrationdlg.cpp \
percentcorrectiondlg.cpp \
pixelstats.cpp \
plotcolor.cpp \
profileplot.cpp \
profileplotpicker.cpp \
psfplot.cpp \
psi_dlg.cpp \
psiphasedisplay.cpp \
Expand All @@ -226,6 +230,7 @@ SOURCES += SingleApplication/singleapplication.cpp \
settingsdft.cpp \
settingsGeneral2.cpp \
settingsigram.cpp \
settingsigramimportconfig.cpp \
settingsprofile.cpp \
showaliasdlg.cpp \
showallcontoursdlg.cpp \
Expand Down Expand Up @@ -266,6 +271,7 @@ HEADERS += bezier/bezier.h \
SingleApplication/singleapplication.h \
annulushelpdlg.h \
arbitrarywavefronthelp.h \
astigpolargraph.h \
arbitrarywavwidget.h \
astigscatterplot.h \
astigstatsdlg.h \
Expand Down Expand Up @@ -302,6 +308,7 @@ HEADERS += bezier/bezier.h \
gplus.h \
graphicsutilities.h \
helpdlg.h \
hotkeysdlg.h \
IgramArea.h \
igramintensity.h \
imagehisto.h \
Expand All @@ -324,9 +331,12 @@ HEADERS += bezier/bezier.h \
outlineplots.h \
outlinestatsdlg.h \
pdfcalibrationdlg.h \
percentcorrectiondlg.h \
percentCorrectionSurface.h \
pixelstats.h \
plotcolor.h \
profileplot.h \
profileplotpicker.h \
psfplot.h \
psi_dlg.h \
psiphasedisplay.h \
Expand All @@ -346,6 +356,7 @@ HEADERS += bezier/bezier.h \
settingsdft.h \
settingsGeneral2.h \
settingsigram.h \
settingsigramimportconfig.h \
settingsprofile.h \
showaliasdlg.h \
showallcontoursdlg.h \
Expand Down Expand Up @@ -384,6 +395,7 @@ HEADERS += bezier/bezier.h \

FORMS += arbitrarywavefronthelp.ui \
annulushelpdlg.ui \
astigpolargraph.ui \
astigstatsdlg.ui \
averagewavefrontfilesdlg.ui \
batchigramwizard.ui \
Expand All @@ -407,6 +419,7 @@ FORMS += arbitrarywavefronthelp.ui \
foucaultview.ui \
generatetargetdlg.ui \
helpdlg.ui \
hotkeysdlg.ui \
igramintensity.ui \
jitteroutlinedlg.ui \
lensdialog.ui \
Expand All @@ -421,6 +434,7 @@ FORMS += arbitrarywavefronthelp.ui \
outlineplots.ui \
outlinestatsdlg.ui \
pdfcalibrationdlg.ui \
percentcorrectiondlg.ui \
pixelstats.ui \
profilearea.ui \
profileplot.ui \
Expand All @@ -441,6 +455,7 @@ FORMS += arbitrarywavefronthelp.ui \
settingsdft.ui \
settingsGeneral2.ui \
settingsigram.ui \
settingsigramimportconfig.ui \
settingsprofile.ui \
showaliasdlg.ui \
showallcontoursdlg.ui \
Expand Down
19 changes: 17 additions & 2 deletions DFTFringe_Dale.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ SOURCES += main.cpp \
annulushelpdlg.cpp \
arbitrarywavefronthelp.cpp \
arbitrarywavwidget.cpp \
astigpolargraph.cpp \
cpoint.cpp \
defocusdlg.cpp \
edgeplot.cpp \
hotkeysdlg.cpp \
mainwindow.cpp \
igramarea.cpp \
circleoutline.cpp \
Expand All @@ -42,8 +44,11 @@ SOURCES += main.cpp \
dftarea.cpp \
oglrendered.cpp \
pdfcalibrationdlg.cpp \
percentcorrectiondlg.cpp \
profileplot.cpp \
profileplotpicker.cpp \
psiresizeimagesdlg.cpp \
settingsigramimportconfig.cpp \
surface3dcontrolsdlg.cpp \
surfacegraph.cpp \
surfacelightingproxy.cpp \
Expand Down Expand Up @@ -148,6 +153,7 @@ HEADERS += mainwindow.h \
annulushelpdlg.h \
arbitrarywavefronthelp.h \
arbitrarywavwidget.h \
astigpolargraph.h \
cpoint.h \
defocusdlg.h \
edgeplot.h \
Expand All @@ -157,10 +163,15 @@ HEADERS += mainwindow.h \
graphicsutilities.h \
dfttools.h \
dftarea.h \
hotkeysdlg.h \
oglrendered.h \
pdfcalibrationdlg.h \
percentCorrectionSurface.h \
percentcorrectiondlg.h \
profileplot.h \
profileplotpicker.h \
psiresizeimagesdlg.h \
settingsigramimportconfig.h \
surface3dcontrolsdlg.h \
surfacegraph.h \
surfacelightingproxy.h \
Expand Down Expand Up @@ -270,16 +281,20 @@ INCLUDEPATH += ./bezier ./SingleApplication
FORMS += mainwindow.ui \
annulushelpdlg.ui \
arbitrarywavefronthelp.ui \
astigpolargraph.ui \
defocusdlg.ui \
dfttools.ui \
dftarea.ui \
edgeplot.ui \
hotkeysdlg.ui \
oglrendered.ui \
pdfcalibrationdlg.ui \
percentcorrectiondlg.ui \
profilearea.ui \
profileplot.ui \
contourtools.ui \
psiresizeimagesdlg.ui \
settingsigramimportconfig.ui \
surface3dcontrolsdlg.ui \
surfaceanalysistools.ui \
metricsdisplay.ui \
Expand Down Expand Up @@ -408,12 +423,12 @@ RC_FILE = DFTFringe.rc
QMAKE_CXXFLAGS += -std=c++11

# The application version
VERSION = 6.2
VERSION = Dale7.3.0

# Define the preprocessor macro to get the application version in our application.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
DEFINES += QAPPLICATION_CLASS=QApplication

DEFINES += DALE_DO_NOT_LOG
DISTFILES += \
buildingDFTFringe64.txt \
helptext.txt \
Expand Down
13 changes: 13 additions & 0 deletions RevisionHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,16 @@
<li>Improved saving speed when working on network drives</li>
</ul>
</ul>

<ul><li>Version 7.3.0</li>
<ul>
<li>Added zonal percent completion graph to profile options</li>
<li>Added polar plot of the astig of selected wave fronts under View menu.</li>
<li>Changed create movie feature to add user provided prefix to each from created.</li>
<li>Added hot keys to import interferogram</li>
<li>Added hot key to help</li>
<li>User can move mouse cursor over any profile shown, click and drag it up or down. Useful for comparing two work sessions results so that they match at zero height.</li>
<li>If mouse is over the profile plot the scroll wheel can increase or decrease the y axis range.</li>
<li>Added auto collimation setting to Ronchi and Foucault feature</li>
<li>Remembered last ROC offset value in Ronchi and Foucault feature to remember last setting when wave front is changed to a different value</li>
</ul>
101 changes: 101 additions & 0 deletions astigpolargraph.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#include "astigpolargraph.h"
#include "ui_astigpolargraph.h"
#include "surfacemanager.h"

void astigPolargraph::makeChart(){


QPolarChart *chart = new QPolarChart();

// process each wave front and place astig on the chart
ui->waveFrontTable->setRowCount(m_list.size());

QValueAxis *angularAxis = new QValueAxis();
angularAxis->setTickCount(9); // First and last ticks are co-located on 0/360 angle.
angularAxis->setLabelFormat("%.0f");
angularAxis->setShadesVisible(true);
angularAxis->setShadesBrush(QBrush(QColor(249, 249, 255)));
chart->addAxis(angularAxis, QPolarChart::PolarOrientationAngular);

QValueAxis *radialAxis = new QValueAxis();
radialAxis->setTickCount(5);
radialAxis->setLabelFormat("%.1f");
chart->addAxis(radialAxis, QPolarChart::PolarOrientationRadial);
double maxAstig = 1.;

QVector<wavefront *> wavefronts =SurfaceManager::get_instance()->m_wavefronts;

for(int ndx = 0; ndx < m_list.length(); ++ndx){
wavefront *wf = wavefronts[m_list[ndx]];
QString name = wf->name;
int slashndx = name.lastIndexOf('/');
QString shortName = name.mid(name.lastIndexOf('/',slashndx-1));
QTableWidgetItem *item = new QTableWidgetItem(shortName, 0);
ui->waveFrontTable->setItem(ndx,0,item);
double xastig = wf->InputZerns[4];
double yastig = wf->InputZerns[5];
double mag = sqrt(xastig * xastig + yastig * yastig);
if (mag > maxAstig) maxAstig = mag;

double angle = (atan2(yastig,xastig)/2.) * 180./M_PI;
angle = 90 - angle;
QScatterSeries *series = new QScatterSeries();

int lastndx = name.lastIndexOf('/');
if (lastndx != -1)
name = name.mid(lastndx);
series->setName(name);
series->append(angle,mag);
series->append(angle+180,mag);
chart->addSeries(series);
series->attachAxis(radialAxis);
series->attachAxis(angularAxis);

QLineSeries *line = new QLineSeries();
line->append(angle,mag);
line->append(angle+180,mag);
chart->addSeries(line);
line->attachAxis(radialAxis);
line->attachAxis(angularAxis);
chart->legend()->markers(line)[0]->setVisible(false);

line->setPen(QPen(series->brush(),5));

QTableWidgetItem *pv = new QTableWidgetItem(QString().number(mag), 0);
item->setForeground(series->brush());
ui->waveFrontTable->setItem(ndx, 1, pv);
QTableWidgetItem *anglewidget = new QTableWidgetItem(QString().number(angle,'f',1), 0);
ui->waveFrontTable->setItem(ndx, 2, anglewidget);
}

chart->setTitle("Magnitude and axis of high edge");
if (m_list.length() > 4)
chart->legend()->setAlignment(Qt::AlignRight);
else chart->legend()->setAlignment(Qt::AlignBottom);

maxAstig = ceil(maxAstig);
radialAxis->setRange(0, maxAstig);
angularAxis->setRange(0, 360);

ui->polarChart->setChart(chart);



}
astigPolargraph::astigPolargraph( QList<int>list, QWidget *parent) :
QDialog(parent),
ui(new Ui::astigPolargraph), m_list(list)
{
ui->setupUi(this);
//For some reason the original starter code of makeChart was in this function but it caused a crash.
// I could never figure out why because that code was taken from a working Qt example. When
// moved to inside another function it worked. So there you go. Exact same code with no changes worked there but not here.
makeChart();
Comment on lines +90 to +93
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes me super uncomfortable. Might just break later on if we don't understand it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too but I did a lot of debugging that I did not list in the comment. I narrowed the issue down to the line where it attaches the radial axis to the plot. At that point there is no debug code to show what happens inside that call. Like I said that code works everywhere else except in that routine. At that point I had to punt. Others are welcome to dig deeper.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on linux and got no issue. I will try the linux build also. So far I did NOT reproduce your issue.



}

astigPolargraph::~astigPolargraph()
{
delete ui;
}
31 changes: 31 additions & 0 deletions astigpolargraph.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef ASTIGPOLARGRAPH_H
#define ASTIGPOLARGRAPH_H

#include <QDialog>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QValueAxis>
#include <QtCharts/QPolarChart>
#include "wavefront.h"

namespace Ui {
class astigPolargraph;
}

class astigPolargraph : public QDialog
{
Q_OBJECT

public:
explicit astigPolargraph(QList<int> list,QWidget *parent = nullptr);
~astigPolargraph();

private:
Ui::astigPolargraph *ui;
QList<int> m_list; // list index of selected wave fronts in surface manager's list.
void makeChart();
};

#endif // ASTIGPOLARGRAPH_H
Loading
Loading