Exemplo n.º 1
0
    def test_function_string_integration_steps(self):
        test_profiles = MultivariateGaussianMassProfile(None, 16)
        test_profiles.integration_steps = 256

        expected = "name=MultivariateGaussianComptonProfile,IntegrationSteps=256,Mass=16.000000,SigmaX=1.000000," \
                   "SigmaY=1.000000,SigmaZ=1.000000;"
        self.assertEqual(expected, test_profiles.create_fit_function_str())
Exemplo n.º 2
0
    def test_function_string_has_expected_form_with_defaults_given(self):
        test_profiles = MultivariateGaussianMassProfile(None, 16)
        param_prefix = "f1."
        param_vals = {
                "f1.SigmaX": 5.0,
                "f1.SigmaY": 8.0,
                "f1.SigmaZ": 6.0,
                "f1.Intensity": 4.5}

        expected = "name=MultivariateGaussianComptonProfile,IntegrationSteps=64,Mass=16.000000,SigmaX=5.000000,SigmaY=8.000000,SigmaZ=6.000000,Intensity=4.500000;"
        self.assertEqual(expected, test_profiles.create_fit_function_str(param_vals, param_prefix))
Exemplo n.º 3
0
    def test_function_string_integration_steps(self):
        test_profiles = MultivariateGaussianMassProfile(None, 16)
        test_profiles.integration_steps = 256

        expected = "name=MultivariateGaussianComptonProfile,IntegrationSteps=256,Mass=16.000000,SigmaX=1.000000,SigmaY=1.000000,SigmaZ=1.000000;"
        self.assertEqual(expected, test_profiles.create_fit_function_str())
Exemplo n.º 4
0
    def test_function_string_has_expected_form_with_no_defaults(self):
        test_profiles = MultivariateGaussianMassProfile(None, 16)

        expected = "name=MultivariateGaussianComptonProfile,IntegrationSteps=64,Mass=16.000000,SigmaX=1.000000,SigmaY=1.000000,SigmaZ=1.000000;"
        self.assertEqual(expected, test_profiles.create_fit_function_str())