diff --git a/TODO b/TODO index 6abc705896152228c4d9a5d2d07ac95231c1b3c6..cd88fbcf583a4dd585f7b815eb9f9330c7184f1a 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ - when include file is not found: "terminate called after throwing an instance of 'std::string'" - fc funzt nicht für Kurven -- ignore op on data file == TO CHECK == diff --git a/distrib/HOWTO b/distrib/HOWTO index 5394ddee87caf44d46ba8e143aee3fd60d5261c5..6397a15fd927fe2f2ef9ab849fa548745d3d0155 100755 --- a/distrib/HOWTO +++ b/distrib/HOWTO @@ -5,7 +5,7 @@ cd pub vi configure.ac # version vi CHANGELOG make maintainer-clean -autoreconf -f -i # if dependencies have changed +autoreconf -f -i # always needed, to update version info ### resynchronize cd ~/f2 diff --git a/pub/src/curve.cpp b/pub/src/curve.cpp index 638d8286c2daf75ecba767d0070bbadfb9c3da0f..1974f76c942ce68e1ed6412051daa6f606d346be 100644 --- a/pub/src/curve.cpp +++ b/pub/src/curve.cpp @@ -582,20 +582,26 @@ void NCurveFile::Fit( bool _allow_slow_conv ) NOlm::IterateC fiter; POlc fc; - while((fc=fiter())) { + while ( (fc=fiter()) ) { data.k = fiter.k(); if( !fc->T->has_dummy() ) throw string( "curve has no formal argument t" ); if( fc->kd>=NOlm::MOM.size() ) throw string( "number of data file out of range" ); POld fd; - if (!(fd= P2D( NOlm::MOM[fc->kd] )) ) - throw string( "is not a data file" ); - if (fc->nJ() != fd->nJ()) + if ( !(fd= P2D( NOlm::MOM[fc->kd] )) ) + throw "file " + strg(fc->kd) + " is not a data file"; + if ( fc->nJ() != fd->nJ() ) throw string( "data file and curve file have " "different number of spectra" ); + if ( !fc->nJ() ) + throw string( "BUG: empty curve and data file" ); + if ( fc->weighing==COlc::_ERR && !fd->VS(0)->dy.size() ) { + cout << "INFO: no error bars => set linear weights\n"; + fc->weighing=COlc::_LIN; + } if ( fc->ProtectedSpecs.size() ) - cout << "some spectra are protected\n"; + cout << "INFO: some spectra are protected\n"; fc->lDoc.push_back( "fitted to file " + strg(fc->kd) + " " + fd->name ); if( fc->range_T ) { @@ -660,9 +666,11 @@ void NCurveFile::Fit( bool _allow_slow_conv ) if ( NFitTune::nPrint ) printf("\n"); data.timeout = time(NULL) + NFitTune::maxtime; + lmmin( npfree, &(Par[0]), D->size(), &data, globalEvaluate, &control, &status, globalPrintout ); + if( status.info==11 ) throw string( "exception in fit function" ); diff --git a/pub/src/opr.cpp b/pub/src/opr.cpp index d2a02ad3eeef72f9ed45b25de7c7e1d980f20938..ba4339af77b2afe32daa9efb681fc6581d3c8701 100644 --- a/pub/src/opr.cpp +++ b/pub/src/opr.cpp @@ -165,14 +165,16 @@ void NOperate::Pointwise( string llabel ) POld fd = P2D( fin ); POlc fc = P2C( fin ); + if ( lref.pointwise() && !fd ) + throw string( "no pointwise operation on curve" ); + if( lref.typ==CVariable::_CP && !fc ) + continue; + POlo fout( fin->new_olo() ); if( lref.typ!=CVariable::_CP ) fout->lDoc.push_back( "o" + lref.var_info() + " " + expr); - if ( lref.pointwise() && !fd ) - throw string( "no pointwise operation on curve" ); - CCoord co; T->coord( co, k ); if ( lref.typ==CVariable::_X ) {