Skip to content
Snippets Groups Projects
Commit ed15bc86 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

corr long-standing error: oixy now really splits into spectra as oi

does.
parent 032cd313
No related branches found
No related tags found
No related merge requests found
......@@ -283,9 +283,9 @@ void NOperate::Integral()
else
fout = POld((dynamic_cast<const COld*>(fin))->new_POld());
fout->log_action("oi " + expr);
fout->ZCo.pop_back();
fout->xco = fin->ZCo.back();
fout->yco = T->node_coord(k);
fout->ZCo.pop_back();
sout = PSpec(new CSpec);
sout->z = fin->V[0]->z;
sout->z.pop_back();
......@@ -300,14 +300,14 @@ void NOperate::Integral()
cout << "result: " << res->to_s() << "\n";
continue;
}
xval = fin->V[j]->z[nz - 1]->to_r();
xval = fin->V[j]->z[nz-1]->to_r();
sout->push_xyd(xval, res->to_r(), res->to_dr());
if (nz >= 2) { // new spectrum if jump in other z values
double zval = fin->V[j]->z[nz - 2]->to_r();
if (j + 1 < fin->nJ() && fin->V[j + 1]->z[nz - 2]->to_r() != zval) {
if (nz > 1) { // new spectrum if jump in other z values
if (j+1 < fin->nJ()
&& fin->V[j+1]->z[nz-2]->to_r() != fin->V[j]->z[nz-2]->to_r()) {
fout->V.push_back(move(sout));
sout = PSpec(new CSpec);
sout->z = fin->V[j + 1]->z;
sout->z = fin->V[j+1]->z;
sout->z.pop_back();
}
}
......@@ -350,22 +350,22 @@ void NOperate::IntXY(string mode)
if (icold < 0)
return;
}
xco = CCoord("x", "");
yco = CCoord("y", "");
while (const COld* fin = fiter.nextD()) {
int nz = fin->ZCo.size();
POld fout(fin->new_POld());
string lin = S("oi") + mode + " " + S(icolx) + " " + S(icoly);
if (with_d)
lin += " " + S(icold);
fout->log_action(lin);
fout->xco = xco;
fout->yco = yco;
fout->xco = CCoord("x", "");
fout->yco = CCoord("y", "");
fout->ZCo.pop_back();
int nz = fin->ZCo.size();
PSpec sout(new CSpec);
sout->z = fin->V[0]->z;
sout->z.pop_back();
for (int j = 0; j < fin->nJ(); j++) {
int n = fin->nPts(j);
......@@ -376,11 +376,13 @@ void NOperate::IntXY(string mode)
else
sout->push_xy(fin->VS(j)->y[icolx], fin->VS(j)->y[icoly]);
sout->z = fin->VS(j)->z;
if (nz > 2) { // new spectrum if jump in other z value
if (j + 1 < fin->nJ()
&& fin->V[j + 1]->z[nz - 2]->to_r() != fin->V[j]->z[nz - 2]->to_r()) {
if (nz > 1) { // new spectrum if jump in other z value
if (j+1 < fin->nJ()
&& fin->V[j+1]->z[nz-2]->to_r() != fin->V[j]->z[nz-2]->to_r()) {
fout->V.push_back(move(sout));
sout = PSpec(new CSpec);
sout->z = fin->V[j+1]->z;
sout->z.pop_back();
}
}
}
......@@ -389,7 +391,6 @@ void NOperate::IntXY(string mode)
}
}
//**************************************************************************************************
//* functional operations
//**************************************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment