Example #1
0
    def info_all():
        
        spec_data = Bayesian.fisher_decomposition(
            fisher_matrix, 'All', opt_model.models, 'isen')
        

        fig = plt.figure(figsize=tall)
        fig = opt_model.plot_fisher_data(spec_data, fig=fig)
        fig.set_size_inches(tall)
        fig.tight_layout()
        return fig
Example #2
0
    def info_sphere():
        ''' Fisher information about the sphere
        '''

        spec_data = Bayesian.fisher_decomposition(
            fisher_matrix, 'Sphere', opt_model.models, 'eos')
        

        fig = plt.figure(figsize=tall)
        fig = opt_model.plot_fisher_data(spec_data, fig=fig)
        fig.tight_layout()
        return fig
Example #3
0
    def info_gun():
        ''' Fisher information about the gun experiment
        '''
        spec_data = Bayesian.fisher_decomposition(
            fisher_matrix, 'Gun', opt_model.models, 'eos')
        


        fig = plt.figure(figsize=tall)
        fig = opt_model.plot_fisher_data(spec_data, fig=fig)
        fig.set_size_inches(tall)
        fig.tight_layout()
        return fig
Example #4
0
    def test_fisher_matrix(self):
        """Tests if the fisher information matrix can be generated correctly
        """

        bayes = Bayesian(simulations=[(self.sim1, self.exp1),
                                      (self.sim2, self.exp2)],
                         model=self.eos_model)

        fisher = bayes.get_fisher_matrix(simid=1)

        n_model = bayes.shape()[1]

        self.assertIsInstance(fisher, np.ndarray)
        self.assertEqual(fisher.shape, (n_model, n_model))

        data = bayes.fisher_decomposition(fisher)
        bayes.plot_fisher_data(data)
        plt.show()
Example #5
0
    fig1.savefig(out_dir+'scipy2016_figure1'+figtype, dpi=1000)

    # Figure 1
    fig1 = plt.figure(figsize=square)
    f1ax1 = fig1.gca()
    eos_model.prior.plot(axis=f1ax1, style='--b')
    eos_true.plot(axis=f1ax1, style='-.g')
    f1ax1.legend(['Prior EOS',
                  'True EOS'])
    fig1.tight_layout()
    fig1.savefig(out_dir+'scipy2016_figure1eos'+figtype, dpi=1000)

    # Figure 5

    fisher = analysis.get_fisher_matrix(simid=0, sens_calc=True)
    spec_data = analysis.fisher_decomposition(fisher)

    fig5 = analysis.plot_fisher_data(spec_data)
    fig5.set_size_inches(tall)
    fig5.tight_layout()
    fig5.savefig(out_dir+'scipy2016_figure5'+figtype, dpi=1000)

    # Figure 2

    fisher = analysis.get_fisher_matrix(simid=1, sens_calc=True)
    spec_data = analysis.fisher_decomposition(fisher)

    fig2 = analysis.plot_fisher_data(spec_data)
    fig2.axes[1].axvline(s_data_s[1])
    fig2.axes[1].annotate(r'$v_{CJ}$',
                          xy=(s_data_s[1],0),