add logx in amplitude proposal and fix it for the relaxed pol

parent b3b07d7e
......@@ -1950,7 +1950,7 @@ void EvolveIntrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
}
}
if(data->amplitudePriorFlag)
if(data->amplitudeProposalFlag)
{
//loop over Npol for signal model, single IFO (nmax=nmin+1) for glitch model
for(n=nmin; n<nmax; n++)
......@@ -2279,28 +2279,31 @@ void EvolveIntrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
*/
else
{
alpha=uniform_draw(seed);
for(n=nmin; n<nmax; n++)
{
paramsx = wave_x[n]->intParams;
paramsy = wave_y[n]->intParams;
draw_wavelet_params(paramsy[ii], range, seed, wave_y[n]->dimension);
if(uniform_draw(seed)<0.5 && data->amplitudeProposalFlag)
if(det==-1 && model_y->Npol > 1) constrain_hplus_hcross(wave_y, ii);
if(alpha<0.5 && data->amplitudeProposalFlag)
{
if(det==-1)
{
data->signal_amplitude_proposal(paramsy[ii], model_x->SnGeo, seed, data->Tobs, prior->range, prior->sSNRpeak);
logqy += ( data->signal_amplitude_prior(paramsy[ii], model_x->SnGeo, data->Tobs, prior->sSNRpeak) );
logqy += ( data->signal_amplitude_prior(paramsy[ii], model_y->SnGeo, data->Tobs, prior->sSNRpeak) );
logqx += ( data->signal_amplitude_prior(paramsx[ii], model_x->SnGeo, data->Tobs, prior->sSNRpeak) );
}
else
{
data->glitch_amplitude_proposal(paramsy[ii], model_x->Snf[det], seed, data->Tobs, prior->range, prior->gSNRpeak);
logqy += ( data->glitch_amplitude_prior(paramsy[ii], model_x->Snf[n], data->Tobs, prior->gSNRpeak) );
logqy += ( data->glitch_amplitude_prior(paramsy[ii], model_y->Snf[n], data->Tobs, prior->gSNRpeak) );
logqx += ( data->glitch_amplitude_prior(paramsx[ii], model_x->Snf[n], data->Tobs, prior->gSNRpeak) );
}
}
}
if(det==-1 && model_y->Npol > 1) constrain_hplus_hcross(wave_y, ii);
}
}//end perturb step
//check priors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment