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

corr?

parent 006372cf
No related branches found
No related tags found
No related merge requests found
......@@ -179,8 +179,7 @@ void NManip::PtsAvgeByErr( const string& subcmd )
POld fin;
while( fin = fiter() ) {
POld fout( fin->new_old() );
fout->lDoc.push_back( "mpae" + subcmd + " " + strg(errbound) );
string groupinfo;
for ( uint j=0; j<fin->nJ(); j++ ) {
PSpec sin = fin->VS(j);
PSpec sout( new CSpec() );
......@@ -188,7 +187,7 @@ void NManip::PtsAvgeByErr( const string& subcmd )
if( !sin->dy.size() )
throw string( "no errors available" );
double xg = 0, yg = 0, vg = 0;
uint ng = 0;
uint ng = 0, istart=0;
for( uint i=0; i<sin->size(); ++i ) {
if ( !mode_abs && sin->y[i]<0 )
throw string( "negative counts not compatible with"
......@@ -201,12 +200,18 @@ void NManip::PtsAvgeByErr( const string& subcmd )
if( ( mode_abs && dg/ng<errbound ) ||
( !mode_abs && yg>0 && dg/yg<errbound ) ) {
sout->push_xyd( xg/ng, yg/ng, dg/ng );
groupinfo += strg(istart) + ",";
xg = 0; yg = 0; vg = 0; ng = 0;
istart = i+1;
}
}
if( sout->size() )
fout->V.push_back(sout);
}
string docline = "mpae" + subcmd + " " + strg(errbound);
if( fin->nJ()==1 )
docline += " #=> groups " + groupinfo.substr(0,groupinfo.size()-1);
fout->lDoc.push_back( docline );
if( fout->nJ() )
NOlm::OloAdd( fout, fiter.k() );
......
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