diff --git a/examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py b/examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py index 896d7d59d2d68fc14fc5b660bdcca06551a4346e..8d8b58df4aa29063e8aac16a4f5bfea718ebfd45 100644 --- a/examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py +++ b/examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py @@ -1,9 +1,10 @@ import numpy as np import matplotlib.pyplot as plt import pyfstat +import gridcorner from make_simulated_data import tstart, duration, tref, F0, F1, F2, Alpha, Delta, delta_F0, dtglitch, outdir -plt.style.use('paper') +plt.style.use('./paper.mplstyle') label = 'semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch' @@ -47,5 +48,7 @@ mcmc.transform_dictionary['F1'] = dict( subtractor=F1, symbol='$\dot{f}-\dot{f}^\mathrm{s}$') mcmc.run() -mcmc.plot_corner(label_offset=0.15, truths=[0, 0, delta_F0, 50]) +fig_and_axes = gridcorner._get_fig_and_axes(4, 2, 0.05) +mcmc.plot_corner(label_offset=0.35, truths=[0, 0, delta_F0, 50], + fig_and_axes=fig_and_axes) mcmc.print_summary() diff --git a/examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py b/examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py index 8d33a661b4ea1963888481afa5a943d642bfb2af..82f1bb5708aa6d2dfbb2bde96b1a2106152004f3 100644 --- a/examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py +++ b/examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py @@ -12,7 +12,7 @@ except ImportError: label = 'semicoherent_glitch_robust_directed_grid_search_on_1_glitch' -plt.style.use('paper') +plt.style.use('./paper.mplstyle') Nstar = 1000 F0_width = np.sqrt(Nstar)*np.sqrt(12)/(np.pi*duration) @@ -29,6 +29,8 @@ tglitchs = [tstart+0.1*duration, tstart+0.9*duration, 0.8*float(duration)/N] delta_F0s = [0, max_delta_F0, max_delta_F0/N] delta_F1s = [0] +print 'Prior widths=', F0_width, F1_width + search = pyfstat.GridGlitchSearch( label, outdir, 'data/*1_glitch*sft', F0s=F0s, F1s=F1s, F2s=F2s, Alphas=Alphas, Deltas=Deltas, tref=tref, minStartTime=tstart, @@ -48,7 +50,7 @@ xyz = [F0_vals, F1_vals, delta_F0s_vals, tglitch_vals_days] labels = ['$f - f^\mathrm{s}$\n[Hz]', '$\dot{f} - \dot{f}^\mathrm{s}$\n[Hz/s]', '$\delta f$\n[Hz]', '$t^g_0$\n[days]', '$\widehat{2\mathcal{F}}$'] fig, axes = gridcorner( - twoF, xyz, projection='log_mean', whspace=0.1, factor=1.2, labels=labels, - showDvals=False, lines=[0, 0, delta_F0, 50]) + twoF, xyz, projection='log_mean', labels=labels, + showDvals=False, lines=[0, 0, delta_F0, 50], label_offset=0.35) fig.savefig('{}/{}_projection_matrix.png'.format(outdir, label), bbox_inches='tight') diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index aa3e75de674093ffbbb3a0d665baae3c8ca94d9d..59d8b837aee6acb5f14f258d9495faada343e6c7 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -743,7 +743,7 @@ class MCMCSearch(core.BaseSearchClass): max_n_ticks=4, plot_contours=True, plot_datapoints=True, - label_kwargs={'fontsize': 12}, + #label_kwargs={'fontsize': 12}, data_kwargs={'alpha': 0.1, 'ms': 0.5}, range=_range, @@ -762,10 +762,10 @@ class MCMCSearch(core.BaseSearchClass): ax.set_rasterization_zorder(-10) for tick in ax.xaxis.get_major_ticks(): - tick.label.set_fontsize(8) + #tick.label.set_fontsize(8) tick.label.set_rotation('horizontal') for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(8) + #tick.label.set_fontsize(8) tick.label.set_rotation('vertical') plt.tight_layout(h_pad=0.0, w_pad=0.0)