/* * lag.cpp * * Created on: Jun 1, 2013 * Author: azoghbi */ #include "inc/lag.hpp" lag::lag( lcurve lc1 , lcurve lc2 , vec fqL , vec pars ) { // ----------- initial parameters ------------ // n1 = lc1.len; n = n1 + lc2.len; dt = lc1.dt; // ------------------------------------------ // // ----------- light curve setup ------------ // setlc(); lc1.demean(); lc2.demean(); int i; for( i=0 ; i3000 ){dpar[i] = 3000;} if( dpar[i]<-3000 ){dpar[i] = -3000;} pars[i] += dpar[i]/((n<10)?10:1); } } void lag::print_pars( vec& pars , vec& errs ){ for( int i=0 ; i M_PI ){ pars[i+nfq] -= 2*M_PI; } while( pars[i+nfq] <-M_PI ){ pars[i+nfq] += 2*M_PI; } } mod::print_pars( pars , errs ); } // ****************************************** // lag10::lag10( lcurve lc1 , lcurve lc2 , vec fqL , vec pars ) { // ----------- initial parameters ------------ // n1 = lc1.len; n = n1 + lc2.len; dt = lc1.dt; // ------------------------------------------ // // ----------- light curve setup ------------ // setlc(); lc1.demean(); lc2.demean(); int i; for( i=0 ; i3 ){dpar[i] = 3;} if( dpar[i]<-3 ){dpar[i] = -3;} //pars[i] += dpar[i]; pars[i] += dpar[i]/((n<5)?10:1); } } void lag10::print_pars( vec& pars , vec& errs ){ for( int i=0 ; i M_PI ){ pars[i+nfq] -= 2*M_PI; } while( pars[i+nfq] <-M_PI ){ pars[i+nfq] += 2*M_PI; } } mod::print_pars( pars , errs ); } void lag10::what_pars( int& ip1 , int& ip2 ){ ip1 = nfq; ip2 = npar; }