Exemplo n.º 1
0
 def test_stog_apply_lorch_with_plot_flag(self, mock_show):
     # Load S(Q) for Argon from test data
     stog = StoG(**self.kwargs_for_stog_input)
     stog.files = self.kwargs_for_files['Files']
     stog.plot_flag = True
     stog.read_all_data()
     stog.merge_data()
     stog.transform_merged()
     q, sq, r, gr = stog.fourier_filter()
     stog.apply_lorch(q, sq, r)
     mock_show.assert_called_with()
Exemplo n.º 2
0
    def test_stog_apply_lorch_default(self):
        # Number of decimal places for precision
        places = 5

        # Load S(Q) for Argon from test data
        stog = StoG(**self.kwargs_for_stog_input)
        stog.files = self.kwargs_for_files['Files']
        stog.plot_flag = False
        stog.read_all_data()
        stog.merge_data()
        stog.transform_merged()
        q, sq, r, gr = stog.fourier_filter()
        stog.apply_lorch(q, sq, r)

        self.assertAlmostEqual(
            stog.df_gr_master.iloc[self.real_space_first][stog.gr_lorch_title],
            self.gofr_lorch_target[0],
            places=places)