def test_error_rates_vary_N2(self): a = ma.Idling_Error_Rate_Analyisis( t_start="20180210_181633", options_dict={ "close_figs": True, "vary_N2": True }, ) expected_dict = { "A": 0.41685563870942149, "N1": 1064.7100611208791, "N2": 3644.550952436859, "offset": 0.52121402524448934, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit +"].best_values[key], value, decimal=2) expected_dict = { "A": -0.13013585779457398, "N1": 1138.3895116903586, "N2": 601415.64642756886, "offset": 0.14572799876310505, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit 0"].best_values[key], value, decimal=2) expected_dict = { "A": 0.74324542246644376, "N1": 939.61974247762646, "N2": 3566698.2870284803, "offset": 0.18301612896797623, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit 1"].best_values[key], value, decimal=2)
def test_error_rates_fixed_N2(self): a = ma.Idling_Error_Rate_Analyisis( t_start="20180210_181633", options_dict={ "close_figs": True, "vary_N2": False }, ) expected_dict = { "A": 0.43481425072120633, "N1": 1034.9644095297574, "N2": 1e21, "offset": 0.50671519356947314, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit +"].best_values[key], value, decimal=2) expected_dict = { "A": -0.13013614484482647, "N1": 1138.3896694924019, "N2": 1e21, "offset": 0.1457282565842071, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit 0"].best_values[key], value, decimal=2) expected_dict = { "A": 0.7432454022744126, "N1": 939.61870748568992, "N2": 1e21, "offset": 0.18301632862249007, } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res["fit 1"].best_values[key], value, decimal=2)
def test_error_rates_vary_N2(self): a = ma.Idling_Error_Rate_Analyisis(t_start='20180210_181633', options_dict={ 'close_figs': True, 'vary_N2': True }) expected_dict = { 'A': 0.41685563870942149, 'N1': 1064.7100611208791, 'N2': 3644.550952436859, 'offset': 0.52121402524448934 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit +'].best_values[key], value, decimal=2) expected_dict = { 'A': -0.13013585779457398, 'N1': 1138.3895116903586, 'N2': 601415.64642756886, 'offset': 0.14572799876310505 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit 0'].best_values[key], value, decimal=2) expected_dict = { 'A': 0.74324542246644376, 'N1': 939.61974247762646, 'N2': 3566698.2870284803, 'offset': 0.18301612896797623 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit 1'].best_values[key], value, decimal=2)
def test_error_rates_fixed_N2(self): a = ma.Idling_Error_Rate_Analyisis(t_start='20180210_181633', options_dict={ 'close_figs': True, 'vary_N2': False }) expected_dict = { 'A': 0.43481425072120633, 'N1': 1034.9644095297574, 'N2': 1e+21, 'offset': 0.50671519356947314 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit +'].best_values[key], value, decimal=2) expected_dict = { 'A': -0.13013614484482647, 'N1': 1138.3896694924019, 'N2': 1e+21, 'offset': 0.1457282565842071 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit 0'].best_values[key], value, decimal=2) expected_dict = { 'A': 0.7432454022744126, 'N1': 939.61870748568992, 'N2': 1e+21, 'offset': 0.18301632862249007 } for key, value in expected_dict.items(): np.testing.assert_almost_equal(a.fit_res['fit 1'].best_values[key], value, decimal=2)