From 5216d1980f0c8b9795b044c1bf8e0c8f6a39aaea Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Fri, 8 Dec 2017 16:25:10 +0100 Subject: [PATCH] Remove obsolete subtractions and style files from examples --- examples/fully_coherent_search_using_MCMC.py | 9 ++++++--- examples/grid_examples/grid_F0F1F2.py | 2 -- examples/grid_examples/grided_frequency_search.py | 2 -- examples/other_examples/twoF_cumulative.py | 2 +- examples/semi_coherent_directed_follow_up.py | 6 ++---- examples/semi_coherent_search_using_MCMC.py | 3 +++ examples/using_initialisation.py | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/fully_coherent_search_using_MCMC.py b/examples/fully_coherent_search_using_MCMC.py index 82fd4dd..72874c7 100644 --- a/examples/fully_coherent_search_using_MCMC.py +++ b/examples/fully_coherent_search_using_MCMC.py @@ -47,8 +47,8 @@ theta_prior = {'F0': {'type': 'unif', 'Delta': Delta } -ntemps = 1 -log10beta_min = -1 +ntemps = 2 +log10beta_min = -0.5 nwalkers = 100 nsteps = [300, 300] @@ -57,6 +57,9 @@ mcmc = pyfstat.MCMCSearch( sftfilepattern='{}/*{}*sft'.format(outdir, label), theta_prior=theta_prior, tref=tref, minStartTime=tstart, maxStartTime=tend, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, log10beta_min=log10beta_min) -mcmc.run(subtractions=[F0, F1]) +mcmc.transform_dictionary = dict( + F0=dict(subtractor=F0, symbol='$f-f^\mathrm{s}$'), + F1=dict(subtractor=F1, symbol='$\dot{f}-\dot{f}^\mathrm{s}$')) +mcmc.run() mcmc.plot_corner(add_prior=True) mcmc.print_summary() diff --git a/examples/grid_examples/grid_F0F1F2.py b/examples/grid_examples/grid_F0F1F2.py index 7456e53..d3583f1 100644 --- a/examples/grid_examples/grid_F0F1F2.py +++ b/examples/grid_examples/grid_F0F1F2.py @@ -3,8 +3,6 @@ import numpy as np import matplotlib.pyplot as plt from projection_matrix import projection_matrix -plt.style.use('paper') - F0 = 30.0 F1 = 1e-10 F2 = 0 diff --git a/examples/grid_examples/grided_frequency_search.py b/examples/grid_examples/grided_frequency_search.py index 5e4a423..e8f5d55 100644 --- a/examples/grid_examples/grided_frequency_search.py +++ b/examples/grid_examples/grided_frequency_search.py @@ -2,8 +2,6 @@ import pyfstat import numpy as np import matplotlib.pyplot as plt -plt.style.use('paper') - F0 = 30.0 F1 = 0 F2 = 0 diff --git a/examples/other_examples/twoF_cumulative.py b/examples/other_examples/twoF_cumulative.py index cd7f042..760fd23 100644 --- a/examples/other_examples/twoF_cumulative.py +++ b/examples/other_examples/twoF_cumulative.py @@ -56,7 +56,7 @@ mcmc = pyfstat.MCMCSearch( sftfilepattern='data/*'+data_label+'*sft', theta_prior=theta_prior, tref=tref, minStartTime=tstart, maxStartTime=tend, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, log10beta_min=log10beta_min) -mcmc.run(context='paper', subtractions=[30, -1e-10]) +mcmc.run() mcmc.plot_corner(add_prior=True) mcmc.print_summary() diff --git a/examples/semi_coherent_directed_follow_up.py b/examples/semi_coherent_directed_follow_up.py index 1ae8144..e84976e 100644 --- a/examples/semi_coherent_directed_follow_up.py +++ b/examples/semi_coherent_directed_follow_up.py @@ -2,8 +2,6 @@ import pyfstat import numpy as np import matplotlib.pyplot as plt -plt.style.use('./paper-style.mplstyle') - F0 = 30.0 F1 = -1e-10 F2 = 0 @@ -63,8 +61,8 @@ NstarMax = 1000 Nsegs0 = 100 fig, axes = plt.subplots(nrows=2, figsize=(3.4, 3.5)) fig, axes = mcmc.run( - NstarMax=NstarMax, Nsegs0=Nsegs0, subtractions=[F0, F1], labelpad=0.01, - plot_det_stat=False, return_fig=True, context='paper', fig=fig, + NstarMax=NstarMax, Nsegs0=Nsegs0, labelpad=0.01, + plot_det_stat=False, return_fig=True, fig=fig, axes=axes) for ax in axes: ax.grid() diff --git a/examples/semi_coherent_search_using_MCMC.py b/examples/semi_coherent_search_using_MCMC.py index cd8d95a..1422fd3 100644 --- a/examples/semi_coherent_search_using_MCMC.py +++ b/examples/semi_coherent_search_using_MCMC.py @@ -58,6 +58,9 @@ mcmc = pyfstat.MCMCSemiCoherentSearch( theta_prior=theta_prior, tref=tref, minStartTime=tstart, maxStartTime=tend, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, log10beta_min=log10beta_min) +mcmc.transform_dictionary = dict( + F0=dict(subtractor=F0, symbol='$f-f^\mathrm{s}$'), + F1=dict(subtractor=F1, symbol='$\dot{f}-\dot{f}^\mathrm{s}$')) mcmc.run() mcmc.plot_corner(add_prior=True) mcmc.print_summary() diff --git a/examples/using_initialisation.py b/examples/using_initialisation.py index 5e7ea5e..efe4336 100644 --- a/examples/using_initialisation.py +++ b/examples/using_initialisation.py @@ -59,6 +59,6 @@ mcmc = pyfstat.MCMCSearch( nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, log10beta_min=log10beta_min) mcmc.setup_initialisation(100, scatter_val=1e-10) -mcmc.run(subtractions=[F0, F1]) +mcmc.run() mcmc.plot_corner(add_prior=True) mcmc.print_summary() -- GitLab