def test_get_percentile_large(self): """Ensures correct output from _get_percentile. In this case, percentile level is large. """ this_percentile = find_norm_params._get_percentile( frequency_dict=MAIN_FREQUENCY_DICT, percentile_level=LARGE_PERCENTILE_LEVEL) self.assertTrue( numpy.isclose(this_percentile, LARGE_PERCENTILE, atol=TOLERANCE))
11e-3: 50, 14e-3: 25, 17e-3: 15, 20e-3: 10 } FREQUENCY_DICT_DICT = { FIRST_KEY_NO_HEIGHT: FIRST_FREQUENCY_DICT, SECOND_KEY_NO_HEIGHT: SECOND_FREQUENCY_DICT, THIRD_KEY_NO_HEIGHT: THIRD_FREQUENCY_DICT } MIN_PERCENTILE_LEVEL = 1. MAX_PERCENTILE_LEVEL = 99. FIRST_PERCENTILES = numpy.array([ find_norm_params._get_percentile(FIRST_FREQUENCY_DICT, MIN_PERCENTILE_LEVEL), find_norm_params._get_percentile(FIRST_FREQUENCY_DICT, MAX_PERCENTILE_LEVEL) ]) SECOND_PERCENTILES = numpy.array([ find_norm_params._get_percentile(SECOND_FREQUENCY_DICT, MIN_PERCENTILE_LEVEL), find_norm_params._get_percentile(SECOND_FREQUENCY_DICT, MAX_PERCENTILE_LEVEL) ]) THIRD_PERCENTILES = numpy.array([ find_norm_params._get_percentile(THIRD_FREQUENCY_DICT, MIN_PERCENTILE_LEVEL), find_norm_params._get_percentile(THIRD_FREQUENCY_DICT,