Commit 5bc42499 authored by Tyson Littenberg's avatar Tyson Littenberg
Browse files

-Aesthetic changes to output pages

-Post-processing now prints wavefrom spectra


git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@547 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent f01fe861
......@@ -20,9 +20,9 @@ body {
}
#top {
background-color: #84c754;
background-color: #71B09F;
color: #ffffff;
border: 1px solid #333333;
border: 1px solid #374040;
padding: 15px;
}
......@@ -65,7 +65,7 @@ body {
}
.menuitem {
background-color: #d4d4d4;
background-color: #B1C7C7;
border: 1px solid #333333;
list-style-type: none;
padding: 2px;
......@@ -73,7 +73,7 @@ body {
}
.menuitem:hover {
background-color: #00BFFF;
background-color: #7A8787;
}
a {
......@@ -103,6 +103,6 @@ table#tab1 tr:nth-child(odd) {
background-color:#fff;
}
table#tab1 th {
background-color: #84c754;
background-color: #71B09F;
color: white;
}
This diff is collapsed.
......@@ -88,14 +88,10 @@ def make_skyview(directory='.', mdc=None, NSIDE=128, ra=None, dec=None, results=
# -- Input skymap data
# num, L, ralist, sin_dec, psi, e, dA, dphi, dt = np.loadtxt(filename, unpack=True)
print "Extracting RA/DEC samples"
filename = './chains/' + jobname + 'signal_extchain.dat.0'
try:
data = np.loadtxt(filename, unpack=True)
except:
filename = './chains/' + jobname + 'signal_1_extchain.dat.0'
data = np.loadtxt(filename, unpack=True)
ralist = data[2]
sin_dec = data[3]
filename = './chains/' + jobname + 'signal_params.dat.0'
data = np.loadtxt(filename, unpack=True)
ralist = data[1]
sin_dec = data[2]
print "Total samples are {0}".format(ralist.size)
# -- Remove burn in samples
......
......@@ -78,7 +78,7 @@ def make_skyview(directory='.', mdc=None, NSIDE=512, results=None, sim=True):
# -- Input skymap data
# num, L, ralist, sin_dec, psi, e, dA, dphi, dt = np.loadtxt(filename, unpack=True)
print "Extracting RA/DEC samples"
filename = './chains/signal_1_extchain.dat.0'
filename = './chains/signal_params.dat.0'
data = np.loadtxt(filename, unpack=True)
ralist = data[2]
sin_dec = data[3]
......
......@@ -471,9 +471,11 @@ int main(int argc, char *argv[])
struct Model *m = NULL;
struct Wavelet *g = NULL;
double **r = malloc(NI*sizeof(double*)); //total residual (just for plotting)
for(ifo=0; ifo<NI; ifo++)
{
r[ifo] = malloc(N*sizeof(double));
for(i=0; i<N; i++) r[ifo][i] = data->s[ifo][i];
m = model[chain->index[0]];
g = m->glitch[ifo];
for(i=1; i<=g->size; i++)
......@@ -484,6 +486,8 @@ int main(int argc, char *argv[])
m->wavelet(data->s[ifo], g->intParams[i], N, -1, data->Tobs);
m->wavelet(g->templates, g->intParams[i], N, -1, data->Tobs);
}
//regress all wavelest from residual array for plotting
m->wavelet(r[ifo], g->intParams[i], N, -1, data->Tobs);
}
rSNR += fourier_nwip(data->imin,data->imax,g->templates,g->templates,data->invSnf[ifo]);
}
......@@ -531,9 +535,14 @@ int main(int argc, char *argv[])
for(ifo=0; ifo<data->NI; ifo++)
{
sprintf(filename,"waveforms/%sfourier_domain_residual_ifo%i.dat",data->runName,ifo);
print_frequency_domain_data(filename, r[ifo], data->N, data->Tobs, data->imin, data->imax);
sprintf(filename,"waveforms/%sfourier_domain_clean_ifo%i.dat",data->runName,ifo);
print_frequency_domain_data(filename, data->s[ifo], data->N, data->Tobs, data->imin, data->imax);
print_frequency_domain_data(filename, data->s[ifo], data->N, data->Tobs, data->imin, data->imax);
free(r[ifo]);
}
free(r);
//Export BayesLine PSD and cleaned data so we can re-start runs
if(data->bayesLineFlag) export_cleaned_data(data);
......
......@@ -1091,9 +1091,9 @@ void print_frequency_domain_data(char filename[], double *h, int N, double Tobs,
fprintf(FDdata,"%lg ",i/Tobs);
if(i<imin || i>imax)
fprintf(FDdata,"%e\n", 0.0);
fprintf(FDdata,"%e %e\n", 0.0, 0.0);
else
fprintf(FDdata,"%e\n", h[re]*h[re]+h[im]*h[im]);
fprintf(FDdata,"%e %e\n", h[re],h[im]);
}
fclose(FDdata);
}
......
......@@ -631,13 +631,13 @@ void RJMCMC(struct Data *data, struct Model **model, struct Chain *chain, struct
}
}
// Compute Evidence/Bayes Factor using last 1/2 of samples
if(mc >= M/4 && mc%(M/100)==0)
// Compute Evidence/Bayes Factor using last 1/4 of samples
if(mc >= M/4)
{
for(ic=0; ic<NC; ic++) logLchain[ic][count] = model[chain->index[ic]]->logL - data->logLc;
count++;
TrapezoidIntegration(chain, logLchain, M, count, modelname, &logZ, &varZ);
if(mc%(M/100)==0)TrapezoidIntegration(chain, logLchain, M, count, modelname, &logZ, &varZ);
}
mc+=chain->cycle;
......
This diff is collapsed.
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