Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ARPA-SIMC/PRAGA
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Feb 18, 2025
2 parents b37450d + 3d29e7c commit 36b0b1a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 14 deletions.
10 changes: 5 additions & 5 deletions DATA/PROJECT/test/SETTINGS/parameters.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ aggregationMethod=AVG
algorithm=idw
lapseRateCode=true
minRegressionR2=0.1
optimalDetrending=true
optimalDetrending=false
thermalInversion=true
topographicDistance=false
useDewPoint=true
useInterpolationTemperatureForRH=true
topographicDistanceMaxMultiplier=128
dynamicLapserate=false
meteogrid_upscalefromdem=true
localDetrending=false
localDetrending=true
glocalDetrending=false
multipleDetrending=false
multipleDetrending=true
min_points_local_detrending=20
doNotRetrend=false
retrendOnly=false
Expand All @@ -52,8 +52,8 @@ field=altitude
order=1
table=point_properties
use_for_spatial_quality_control=true
fitting_parameters_min=0, -3.50001, 0.002, -0.01
fitting_parameters_max=2500, 13, 0.007, -0.0015
fitting_parameters_min=0, -22, 0.002, -0.01
fitting_parameters_max=2500, 46, 0.007, -0.0015
fitting_first_guess=0, 1, 1, 1
fitting_function=double_piecewise

Expand Down
24 changes: 23 additions & 1 deletion agrolib/proxyWidget/proxyWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "dialogChangeAxis.h"
#include "meteo.h"
#include "proxyWidget.h"
#include "utilities.h"
Expand All @@ -9,6 +10,8 @@

#include <QLayout>
#include <QDate>
#include <QColorDialog>



Crit3DProxyWidget::Crit3DProxyWidget(Crit3DInterpolationSettings* interpolationSettings, Crit3DMeteoPoint *meteoPoints, int nrMeteoPoints, frequencyType currentFrequency, QDate currentDate, int currentHour, Crit3DQuality *quality, Crit3DInterpolationSettings* SQinterpolationSettings, Crit3DMeteoSettings *meteoSettings, Crit3DClimateParameters *climateParam, bool checkSpatialQuality, int macroAreaNumber)
Expand All @@ -18,7 +21,7 @@ Crit3DProxyWidget::Crit3DProxyWidget(Crit3DInterpolationSettings* interpolationS
this->resize(1024, 700);
this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
this->setAttribute(Qt::WA_DeleteOnClose);

// layout
QVBoxLayout *mainLayout = new QVBoxLayout();
QGroupBox *horizontalGroupBox = new QGroupBox();
Expand Down Expand Up @@ -130,7 +133,10 @@ Crit3DProxyWidget::Crit3DProxyWidget(Crit3DInterpolationSettings* interpolationS
QMenuBar* menuBar = new QMenuBar();
QMenu *editMenu = new QMenu("Edit");
QAction* updateStations = new QAction(tr("&Update"), this);
QAction* changeLeftAxis = new QAction(tr("&Change axis left"), this);

editMenu->addAction(updateStations);
editMenu->addAction(changeLeftAxis);

menuBar->addMenu(editMenu);
mainLayout->setMenuBar(menuBar);
Expand All @@ -143,6 +149,8 @@ Crit3DProxyWidget::Crit3DProxyWidget(Crit3DInterpolationSettings* interpolationS
connect(&modelLR, &QCheckBox::toggled, [=](int toggled){ this->modelLRClicked(toggled); });
connect(&detrended, &QCheckBox::toggled, [=](){ this->plot(); });
connect(updateStations, &QAction::triggered, this, [=](){ this->plot(); });
connect(changeLeftAxis, &QAction::triggered, this, &Crit3DProxyWidget::on_actionChangeLeftAxis);


if (currentFrequency != noFrequency)
{
Expand Down Expand Up @@ -548,6 +556,20 @@ void Crit3DProxyWidget::modelLRClicked(int toggled)
}
}

void Crit3DProxyWidget::on_actionChangeLeftAxis()
{

DialogChangeAxis changeAxisDialog(1, false);
if (changeAxisDialog.result() == QDialog::Accepted)
{
//axisY_sx->setMin(changeAxisDialog.getMinVal());
//axisY_sx->setMax(changeAxisDialog.getMaxVal());
chartView->axisY->setMin(floor(changeAxisDialog.getMinVal()));
chartView->axisY->setMax(ceil(changeAxisDialog.getMaxVal()));
}
}


void Crit3DProxyWidget::addMacroAreaLR()
{
//controllo is glocal ready viene fatto a monte
Expand Down
23 changes: 15 additions & 8 deletions agrolib/proxyWidget/proxyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public:
Crit3DProxyWidget(Crit3DInterpolationSettings* interpolationSettings, Crit3DMeteoPoint* meteoPoints, int nrMeteoPoints, frequencyType currentFrequency, QDate currentDate, int currentHour, Crit3DQuality* quality, Crit3DInterpolationSettings* SQinterpolationSettings, Crit3DMeteoSettings *meteoSettings, Crit3DClimateParameters *climateParam, bool checkSpatialQuality, int macroAreaNumber);
~Crit3DProxyWidget();
void closeEvent(QCloseEvent *event);
~Crit3DProxyWidget() override;
void closeEvent(QCloseEvent *event) override;
void updateDateTime(QDate newDate, int newHour);
void updateFrequency(frequencyType newFrequency);
void changeProxyPos(const QString proxyName);
Expand All @@ -26,18 +26,25 @@
void addMacroAreaLR();

private:

int nrMeteoPoints;
bool checkSpatialQuality;
int currentHour;
int proxyPos;
int macroAreaNumber;

std::vector <Crit3DInterpolationDataPoint> outInterpolationPoints;
Crit3DInterpolationSettings* interpolationSettings;
Crit3DQuality* quality;
Crit3DInterpolationSettings* SQinterpolationSettings;
Crit3DMeteoSettings *meteoSettings;
Crit3DMeteoPoint* meteoPoints;
Crit3DClimateParameters *climateParam;
int nrMeteoPoints;
bool checkSpatialQuality;

frequencyType currentFrequency;
QDate currentDate;
int currentHour;
std::vector <Crit3DInterpolationDataPoint> outInterpolationPoints;

QValueAxis *axisY_sx;
QComboBox comboVariable;
QComboBox comboAxisX;
QCheckBox detrended;
Expand All @@ -47,11 +54,11 @@
QTextEdit lapseRate;
ChartView *chartView;
meteoVariable myVar;
int proxyPos;
int macroAreaNumber;

Crit3DTime getCurrentTime();

void on_actionChangeLeftAxis();

signals:
void closeProxyWidget();
};
Expand Down

0 comments on commit 36b0b1a

Please sign in to comment.