Skip to content

Commit

Permalink
Merge pull request #251 from PauloCarvalhoRJ/Next_Release
Browse files Browse the repository at this point in the history
Release v6.5
  • Loading branch information
PauloCarvalhoRJ authored Aug 12, 2020
2 parents 0389c98 + ed860d1 commit f49122c
Show file tree
Hide file tree
Showing 72 changed files with 7,316 additions and 202 deletions.
37 changes: 33 additions & 4 deletions GammaRay.pro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ win32 {
SOURCES += main.cpp\
dialogs/choosevariabledialog.cpp \
dialogs/faciestransitionmatrixoptionsdialog.cpp \
domain/auxiliary/verticalproportioncurvemaker.cpp \
domain/verticalproportioncurve.cpp \
geometry/intersectionfinder.cpp \
geostats/mcmcdataimputation.cpp \
mainwindow.cpp \
domain/project.cpp \
Expand Down Expand Up @@ -86,7 +89,12 @@ SOURCES += main.cpp\
domain/plot.cpp \
domain/experimentalvariogram.cpp \
domain/variogrammodel.cpp \
vertpropcurves/verticalproportioncurvedialog.cpp \
vertpropcurves/verticalproportioncurvescanvaspicker.cpp \
vertpropcurves/verticalproportioncurvesplot.cpp \
viewer3d/v3dmouseinteractor.cpp \
widgets/linechartwidget.cpp \
widgets/qlistwidgetdnd.cpp \
widgets/variogrammodellist.cpp \
domain/weight.cpp \
domain/normalvariable.cpp \
Expand Down Expand Up @@ -273,16 +281,23 @@ SOURCES += main.cpp\
gslib/gslibparameterfiles/commonsimulationparameters.cpp \
spatialindex/spatialindex.cpp \
geostats/taumodel.cpp \
dialogs/mcmcdataimputationdialog.cpp
dialogs/mcmcdataimputationdialog.cpp \
imagejockey/paraviewscalarbar/vtkBoundingRectContextDevice2D.cpp \
imagejockey/paraviewscalarbar/vtkContext2DScalarBarActor.cpp \
imagejockey/paraviewscalarbar/vtkParaViewScalarBar.cpp \
imagejockey/paraviewscalarbar/vtkPVScalarBarRepresentation.cpp

HEADERS += mainwindow.h \
dialogs/choosevariabledialog.h \
dialogs/faciestransitionmatrixoptionsdialog.h \
domain/auxiliary/verticalproportioncurvemaker.h \
domain/project.h \
domain/application.h \
domain/projectcomponent.h \
domain/objectgroup.h \
domain/projectroot.h \
domain/verticalproportioncurve.h \
geometry/intersectionfinder.h \
geostats/mcmcdataimputation.h \
util.h \
exceptions/invalidgslibdatafileexception.h \
Expand Down Expand Up @@ -334,7 +349,12 @@ HEADERS += mainwindow.h \
domain/plot.h \
domain/experimentalvariogram.h \
domain/variogrammodel.h \
vertpropcurves/verticalproportioncurvedialog.h \
vertpropcurves/verticalproportioncurvescanvaspicker.h \
vertpropcurves/verticalproportioncurvesplot.h \
viewer3d/v3dmouseinteractor.h \
widgets/linechartwidget.h \
widgets/qlistwidgetdnd.h \
widgets/variogrammodellist.h \
domain/weight.h \
domain/normalvariable.h \
Expand Down Expand Up @@ -524,7 +544,11 @@ HEADERS += mainwindow.h \
gslib/gslibparameterfiles/commonsimulationparameters.h \
spatialindex/spatialindex.h \
geostats/taumodel.h \
dialogs/mcmcdataimputationdialog.h
dialogs/mcmcdataimputationdialog.h \
imagejockey/paraviewscalarbar/vtkBoundingRectContextDevice2D.h \
imagejockey/paraviewscalarbar/vtkContext2DScalarBarActor.h \
imagejockey/paraviewscalarbar/vtkParaViewScalarBar.h \
imagejockey/paraviewscalarbar/vtkPVScalarBarRepresentation.h


FORMS += mainwindow.ui \
Expand All @@ -545,6 +569,8 @@ FORMS += mainwindow.ui \
gslib/gslibparams/widgets/widgetgslibpargrid.ui \
gslib/gslibparams/widgets/widgetgslibparrepeat.ui \
gslib/gslibparams/widgets/widgetgslibparcolor.ui \
widgets/linechartwidget.ui \
vertpropcurves/verticalproportioncurvedialog.ui \
widgets/variogrammodellist.ui \
widgets/univariatedistributionselector.ui \
widgets/distributioncolumnroleselector.ui \
Expand Down Expand Up @@ -701,7 +727,10 @@ LIBS += -lvtkGUISupportQt$$_VTK_VERSION_SUFFIX \
-lvtkFiltersStatistics$$_VTK_VERSION_SUFFIX \
-lvtkalglib$$_VTK_VERSION_SUFFIX \
-lvtkImagingStencil$$_VTK_VERSION_SUFFIX \
-lvtkImagingHybrid$$_VTK_VERSION_SUFFIX
-lvtkImagingHybrid$$_VTK_VERSION_SUFFIX \
-lvtkRenderingContext2D$$_VTK_VERSION_SUFFIX \
-lvtkChartsCore$$_VTK_VERSION_SUFFIX \
-lvtkRenderingContextOpenGL2$$_VTK_VERSION_SUFFIX

#=============================================================================

Expand Down Expand Up @@ -775,7 +804,7 @@ win32 {
# The application version
# Don't forget to update the Util::importSettingsFromPreviousVersion() method to
# enable the import of registry/user settings of previous versions.
VERSION = 6.3
VERSION = 6.5

# Define a preprocessor macro so we can get the application version in application code.
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
Expand Down
Binary file added art/iconsHD/editCurve32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/iconsHD/recycle32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/iconsHD/vpc32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions dialogs/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ GSLib geostatistics software.\n\nGSLib by Centre for Computational Geostatistics
University of Alberta.\n\n").\
append(APP_NAME).append(" uses GhostScript to parse GSLib PostScript plots. \
GhostScript by Artifex Software Inc.\n\n").\
append(APP_NAME).append(" uses GraphViz to generate network-like plots. \
GraphViz by John Ellson et al. (https://graphviz.org/credits).\n\n").\
append(APP_NAME).append(" is internally powered by Boost, Eigen, Exprtk, Qt, Qwt, fftw, VTK, ITK and GSL. \n\n").\
append(APP_NAME).append(" by Paulo R. M. Carvalho (paulo.r.m.carvalho@gmail.com), Pericles Machado (periclesraskolnikoff@gmail.com) and the code contributors (see LICENSE.md file)\n\n").\
append(APP_NAME).append(" is licensed under the Creative Commons BY-SA license v3.0."));

Expand Down
1 change: 0 additions & 1 deletion dialogs/aboutdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
</widget>
<resources>
<include location="../resources.qrc"/>
<include location="resources.qrc"/>
</resources>
<connections>
<connection>
Expand Down
91 changes: 91 additions & 0 deletions dialogs/automaticvarfitdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "domain/attribute.h"
#include "domain/cartesiangrid.h"
#include "domain/application.h"
#include "domain/pointset.h"
#include "domain/project.h"
#include "imagejockey/widgets/ijgridviewerwidget.h"
#include "spectral/spectral.h"
#include "imagejockey/svd/svdfactor.h"
Expand All @@ -21,6 +23,7 @@
#include <QChartView>
#include <QValueAxis>


AutomaticVarFitDialog::AutomaticVarFitDialog(Attribute *at, QWidget *parent) :
QDialog(parent),
ui(new Ui::AutomaticVarFitDialog),
Expand Down Expand Up @@ -460,6 +463,78 @@ void AutomaticVarFitDialog::onMethodTabChanged(int tabIndex)
ui->btnRunExperiments->setEnabled( false );
}

void AutomaticVarFitDialog::onResetAccumulatedScatterDataOfExperiments()
{
if( ! m_accumulatedStructuresForClusterAnalysis.empty() ) {
QMessageBox::StandardButton reply;
reply = QMessageBox::question( this, "Confirm operation", "There are " +
QString::number( m_accumulatedStructuresForClusterAnalysis.size() ) +
" accumulated fitted structures. Are you sure you want to discard them?", \
QMessageBox::Yes | QMessageBox::No );
if( reply == QMessageBox::Yes ){
m_accumulatedStructuresForClusterAnalysis.clear();
}
}
}

void AutomaticVarFitDialog::onSaveScatterDataOfExperiments()
{
if( m_accumulatedStructuresForClusterAnalysis.empty() ){
Application::instance()->logError( "AutomaticVarFitDialog::onSaveScatterDataOfExperiments(): "
"No accumulated data to save.", true );
return;
}

//open a file naming dialog for the user
QString suggested_name = "AutoVarFit_scatter_data.xyz";
bool ok;
QString ps_file_name = QInputDialog::getText(this, "Name the new file",
"New point set file with experiments scatter data: ",
QLineEdit::Normal, suggested_name, &ok);
if( ! ok )
return;

//get the number of accumulated fitted structures
int nRows = m_accumulatedStructuresForClusterAnalysis.size();

//create a new Point Set object to receive the parameters of the variogram structures as data
PointSet* new_ps = new PointSet( Application::instance()->getProject()->getPath() +
'/' + ps_file_name );

// Crate the data columns representing each parameter.
new_ps->addEmptyDataColumn( "range" , nRows );
new_ps->addEmptyDataColumn( "ranges ratio" , nRows );
new_ps->addEmptyDataColumn( "azimuth" , nRows );
new_ps->addEmptyDataColumn( "contribution" , nRows );

//compute mid points for the PointSet object
for( int iRow = 0; iRow < nRows; ++iRow ){
const IJVariographicStructure2D& structure = m_accumulatedStructuresForClusterAnalysis[iRow];
new_ps->setData( iRow, 0, structure.range );
new_ps->setData( iRow, 1, structure.rangeRatio );
new_ps->setData( iRow, 2, Util::radiansToHalfAzimuth( structure.azimuth, true ) );
new_ps->setData( iRow, 3, structure.contribution );
}

//commit data to file system
new_ps->writeToFS();

//set appropriate metadata
new_ps->setInfo( 1, //these indexes are GEO-EAS indexes (1st == 1)
2,
3,
"");

//save the metadata
new_ps->updateMetaDataFile();

//adds the new scatter data file (a point set) to the project.
Application::instance()->getProject()->addDataFile( new_ps );

//show the newly created object in main window's project tree
Application::instance()->refreshProjectTree();
}

void AutomaticVarFitDialog::runExperimentsWithSAandGD(const AutomaticVarFitExperimentsDialog& expParDiag)
{
switch ( expParDiag.getParameterIndex() ) {
Expand Down Expand Up @@ -538,6 +613,10 @@ void AutomaticVarFitDialog::runExperimentsWithSAandGD(
QString("seed=%1;Ti=%2;Tf=%3;hop=%4").arg(seed).arg(tInitial).arg(tFinal).arg(hopFactor),
m_autoVarFit.getObjectiveFunctionValuesOfLastRun()
} );
//accumulate the fitted structures if requested.
if( ui->chkGenerateScatterData->isChecked() )
m_accumulatedStructuresForClusterAnalysis.
insert(m_accumulatedStructuresForClusterAnalysis.end(), model.begin(), model.end());
}

//----------------Set chart title and show the curves--------------------
Expand Down Expand Up @@ -599,6 +678,10 @@ void AutomaticVarFitDialog::runExperimentsWithLSRS(int seedI, int seedF, int see
QString("seed=%1;nLines=%2").arg(seed).arg(nLines),
m_autoVarFit.getObjectiveFunctionValuesOfLastRun()
} );
//accumulate the fitted structures if requested.
if( ui->chkGenerateScatterData->isChecked() )
m_accumulatedStructuresForClusterAnalysis.
insert(m_accumulatedStructuresForClusterAnalysis.end(), model.begin(), model.end());
}

//----------------Set chart title and show the curves--------------------
Expand Down Expand Up @@ -698,6 +781,10 @@ void AutomaticVarFitDialog::runExperimentsWithPSO(int seedI, int see
arg(seed).arg(nParticles).arg(inertia).arg(acceleration1).arg(acceleration2),
m_autoVarFit.getObjectiveFunctionValuesOfLastRun()
} );
//accumulate the fitted structures if requested.
if( ui->chkGenerateScatterData->isChecked() )
m_accumulatedStructuresForClusterAnalysis.
insert(m_accumulatedStructuresForClusterAnalysis.end(), model.begin(), model.end());
}

//----------------Set chart title and show the curves--------------------
Expand Down Expand Up @@ -828,6 +915,10 @@ void AutomaticVarFitDialog::runExperimentsWithGenetic(int seedI, int
arg(seed).arg(iPopSize).arg((int)selSize).arg(xOverProb).arg((int)pointOfXOver).arg(mutRate),
m_autoVarFit.getObjectiveFunctionValuesOfLastRun()
} );
//accumulate the fitted structures if requested.
if( ui->chkGenerateScatterData->isChecked() )
m_accumulatedStructuresForClusterAnalysis.
insert(m_accumulatedStructuresForClusterAnalysis.end(), model.begin(), model.end());
}

//----------------Set chart title and show the curves--------------------
Expand Down
6 changes: 6 additions & 0 deletions dialogs/automaticvarfitdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class AutomaticVarFitDialog : public QDialog

AutomaticVariogramFitting m_autoVarFit;

std::vector< IJVariographicStructure2D > m_accumulatedStructuresForClusterAnalysis;

private Q_SLOTS:

void onDoWithSAandGD();
Expand All @@ -51,6 +53,10 @@ private Q_SLOTS:

void onMethodTabChanged( int tabIndex );

void onResetAccumulatedScatterDataOfExperiments();

void onSaveScatterDataOfExperiments();

private:
void runExperimentsWithSAandGD(const AutomaticVarFitExperimentsDialog& expParDiag);
void runExperimentsWithSAandGD(
Expand Down
Loading

0 comments on commit f49122c

Please sign in to comment.