/* * psdlag.cpp * * Created on: Jun 1, 2013 * Author: azoghbi */ #include "inc/psdlag_rms.hpp" psdlag_rms::psdlag_rms( lcurve lc1, lcurve lc2 , vec fqL ) { // ----------- initial parameters ------------ // n1 = lc1.len; n = n1 + lc2.len; dt = lc1.dt; // ------------------------------------------ // // ----------- light curve setup ------------ // setlc(); mean1 = lc1.demean(); mean2 = lc2.demean(); mean1sq = mean1*mean1; mean2sq = mean2*mean2; mean12 = mean1*mean2; 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 psdlag_rms::print_pars( vec& pars , vec& errs ){ for( int i=0 ; i M_PI ){ pars[i+3*nfq] -= 2*M_PI; } while( pars[i+3*nfq] <-M_PI ){ pars[i+3*nfq] += 2*M_PI; } mod::print_pars( pars , errs ); } } // ++++++++++++++++++++++++++++++++++++++++++++++++++++++ // psdlag10_rms::psdlag10_rms( lcurve lc1, lcurve lc2 , vec fqL ) { // ----------- initial parameters ------------ // n1 = lc1.len; n = n1 + lc2.len; dt = lc1.dt; // ------------------------------------------ // // ----------- light curve setup ------------ // setlc(); mean1 = lc1.demean(); mean2 = lc2.demean(); mean1sq = mean1*mean1; mean2sq = mean2*mean2; mean12 = mean1*mean2; 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 psdlag10_rms::print_pars( vec& pars , vec& errs ){ for( int i=0 ; i M_PI ){ pars[i+3*nfq] -= 2*M_PI; } while( pars[i+3*nfq] <-M_PI ){ pars[i+3*nfq] += 2*M_PI; } } mod::print_pars( pars , errs ); } void psdlag10_rms::what_pars( int& ip1 , int& ip2 ){ ip1 = 3*nfq; ip2 = 4*nfq; }