<commit_before># coding: utf-8

""" Potential used in Price-Whelan et al. (in prep.) TODO """

from __future__ import division, print_function

__author__ = "adrn <<EMAIL>>"

# Third-party
import astropy.units as u

# Project
from .core import CartesianCompositePotential
from .cbuiltin import HernquistPotential, MiyamotoNagaiPotential, LeeSutoNFWPotential

__all__ = ['PW14Potential']


class PW14Potential(CartesianCompositePotential):

    def __init__(self, m_disk=6.5E10, a=6.5, b=0.26,
                 m_spher=2E10, c=0.3,
                 q1=1.4, q2=1., q3=0.6,
                 v_h=0.562, r_h=30.,
                 phi=0., theta=0., psi=0.):

        # Choice of r_h comes from c ~ 10 for MW, and R_vir ~ 200 kpc
        # Choice of v_h sets circular velocity at Sun to 220 km/s
        usys = (u.kpc, u.M_sun, u.Myr, u.radian)
        self.usys = usys

        kwargs = dict()
        kwargs["disk"] = MiyamotoNagaiPotential(usys=usys,
                                                m=m_disk, a=a, b=b)

        kwargs["bulge"] = HernquistPotential(usys=usys,
                                             m=m_spher, c=c)

        kwargs["halo"] = LeeSutoNFWPotential(usys=usys,
                                             a=q1, b=q2, c=q3,
                                             v_h=v_h, r_h=r_h,
                                             phi=phi, theta=theta, psi=psi)
        super(PW14Potential,self).__init__(**kwargs)
<commit_msg>default halo is prolate<commit_after># coding: utf-8

""" Potential used in Price-Whelan et al. (in prep.) TODO """

from __future__ import division, print_function

__author__ = "adrn <<EMAIL>>"

# Third-party
import astropy.units as u
import numpy as np

# Project
from .core import CartesianCompositePotential
from .cbuiltin import HernquistPotential, MiyamotoNagaiPotential, LeeSutoNFWPotential

__all__ = ['PW14Potential']


class PW14Potential(CartesianCompositePotential):

    def __init__(self, m_disk=6.5E10, a=6.5, b=0.26,
                 m_spher=2E10, c=0.3,
                 q1=1.4, q2=1., q3=0.6,
                 v_h=0.562, r_h=30.,
                 phi=np.pi/2., theta=np.pi/2., psi=np.pi/2.):

        # Choice of v_h sets circular velocity at Sun to 220 km/s
        usys = (u.kpc, u.M_sun, u.Myr, u.radian)
        self.usys = usys

        kwargs = dict()
        kwargs["disk"] = MiyamotoNagaiPotential(usys=usys,
                                                m=m_disk, a=a, b=b)

        kwargs["bulge"] = HernquistPotential(usys=usys,
                                             m=m_spher, c=c)

        kwargs["halo"] = LeeSutoNFWPotential(usys=usys,
                                             a=q1, b=q2, c=q3,
                                             v_h=v_h, r_h=r_h,
                                             phi=phi, theta=theta, psi=psi)
        super(PW14Potential,self).__init__(**kwargs)

{'fraction_non_alphanumeric': 0.11207194742303701, 'fraction_numerical': 0.03216879972327914, 'mean_word_length': 1.7231638418079096, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4483650', 'n_tokens_mistral': 1055, 'n_tokens_neox': 960, 'n_words': 210}