/* * psdlag.cpp * * Created on: Jun 1, 2013 * Author: azoghbi */ #include "inc/psdlag.hpp" psdlag::psdlag( lcurve lc1, lcurve lc2 , vec fqL ) { // ----------- 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 psdlag::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::psdlag10( lcurve lc1, lcurve lc2 , vec fqL ) { // ----------- 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 psdlag10::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::what_pars( int& ip1 , int& ip2 ){ ip1 = 3*nfq; ip2 = 4*nfq; }