Beispiel #1
0
    def test_derivatives(self):
        """

        :return:
        """
        doublechameleon = DoubleChameleonPointMass()

        phi_G, q = 0.3, 0.8
        e1, e2 = param_util.phi_q2_ellipticity(phi_G, q)
        kwargs_light = {
            'theta_E': 1.,
            'ratio_pointmass': 3,
            'ratio_chameleon': 2,
            'w_c1': .5,
            'w_t1': 1.,
            'e11': e1,
            'e21': e2,
            'w_c2': .1,
            'w_t2': .5,
            'e12': e1,
            'e22': e2
        }
        f_x, f_y = doublechameleon.derivatives(x=1, y=1., **kwargs_light)
        npt.assert_almost_equal(f_x, 0.445004064611891, decimal=4)
        npt.assert_almost_equal(f_y, 0.46313862781025106, decimal=4)
Beispiel #2
0
    def test_derivatives(self):
        """

        :return:
        """
        doublechameleon = DoubleChameleonPointMass()

        phi_G, q = 0.3, 0.8
        e1, e2 = param_util.phi_q2_ellipticity(phi_G, q)
        kwargs_light = {
            'alpha_1': 1.,
            'ratio_pointmass': 3,
            'ratio_chameleon': 2,
            'w_c1': .5,
            'w_t1': 1.,
            'e11': e1,
            'e21': e2,
            'w_c2': .1,
            'w_t2': .5,
            'e12': e1,
            'e22': e2
        }
        f_x, f_y = doublechameleon.derivatives(x=1, y=1., **kwargs_light)
        npt.assert_almost_equal(f_x, 0.4348690461571936, decimal=4)
        npt.assert_almost_equal(f_y, 0.4530081649948411, decimal=4)