pyrats/physics.py
def Mhalo(mStar, z):
    """
    Give the halo mass as a function of the stellar mass (mStar) at a
    given redshift z following Behroozi et al - 2012 formula

    """
    mh = np.logspace(3, 15, 1500)
    mstar = np.copy([Mstar(mmh, z) for mmh in mh])
    diffm = np.abs(mstar - mStar)
    arg = diffm.argmin()
    mhalo = mh[arg]
    if diffm[arg] / mhalo > 1e-2:
        print('there might be something wrong in the estimation of mHalo')
    return mhalo

    Give the halo mass as a function of the stellar mass (mStar) at a
    given redshift z following Behroozi et al - 2012 formula

    
Give the halo mass as a function of the stellar mass (mStar) at a
given redshift z following Behroozi et al - 2012 formula
Give the halo mass as a function of the stellar mass ( mStar ) at a given redshift z following Behroozi et al - 2012 formula
def Mhalo(mStar, z):
    mh = np.logspace(3, 15, 1500)
    mstar = np.copy([Mstar(mmh, z) for mmh in mh])
    diffm = np.abs(mstar - mStar)
    arg = diffm.argmin()
    mhalo = mh[arg]
    if diffm[arg] / mhalo > 1e-2:
        print('there might be something wrong in the estimation of mHalo')
    return mhalo
def Mhalo ( mStar , z ) : mh = np . logspace ( 3 , 15 , 1500 ) mstar = np . copy ( [ Mstar ( mmh , z ) for mmh in mh ] ) diffm = np . abs ( mstar - mStar ) arg = diffm . argmin ( ) mhalo = mh [ arg ] if diffm [ arg ] / mhalo > 1e-2 : print ( 'there might be something wrong in the estimation of mHalo' ) return mhalo
Give the halo mass as a function of the stellar mass (mStar) at a
given redshift z following Behroozi et al - 2012 formula
Give the halo mass as a function of the stellar mass ( mStar ) at a given redshift z following Behroozi et al - 2012 formula
"""
    Give the halo mass as a function of the stellar mass (mStar) at a
    given redshift z following Behroozi et al - 2012 formula

    """
mStar
z