示例#1
0
def _check_c(z, m, answer, relation):
    if relation == 'Duffy':
        c200 = cofm.c_Duffy(z, m)
    elif relation == 'DuttonMaccio':
        c200 = cofm.c_DuttonMaccio(z, m)
    elif relation == 'Prada':
        c200 = cofm.c_Prada(z, m)
    assert_allclose(c200, answer)
示例#2
0
def _check_c(z, m, answer, relation):
    if relation == 'Duffy':
        c200 = cofm.c_Duffy(z, m)
    elif relation == 'DuttonMaccio':
        c200 = cofm.c_DuttonMaccio(z, m)
    elif relation == 'Prada':
        c200 = cofm.c_Prada(z, m)
    assert_allclose(c200, answer)
示例#3
0
    def _calculate_concentrations(self):
        if self._cm == 'DuttonMaccio':
            self._c200 = cofm.c_DuttonMaccio(self._z, self._m200,
                                             h=self._cosmo.h)
        elif self._cm == 'Prada':
            self._c200 = cofm.c_Prada(self._z, self._m200, h=self._cosmo.h,
                                      Om_M=self._cosmo.Om0,
                                      Om_L=1 - self._cosmo.Om0)
        elif self._cm == 'Duffy':
            self._c200 = cofm.c_Duffy(self._z, self._m200, h=self._cosmo.h)

        self._df['c200'] = pd.Series(self._c200, index=self._df.index)
        self._calculate_deltac()
示例#4
0
    def _calculate_concentrations(self):
        if self._cm == 'DuttonMaccio':
            self._c200 = cofm.c_DuttonMaccio(self._z,
                                             self._m200,
                                             h=self._cosmo.h)
        elif self._cm == 'Prada':
            self._c200 = cofm.c_Prada(self._z,
                                      self._m200,
                                      h=self._cosmo.h,
                                      Om_M=self._cosmo.Om0,
                                      Om_L=1 - self._cosmo.Om0)
        elif self._cm == 'Duffy':
            self._c200 = cofm.c_Duffy(self._z, self._m200, h=self._cosmo.h)

        elif self._cm == 'Diemer18':  #add diemer18 value
            self._c200 = self._cmval
            if np.shape(self._c200) == (1, 1):
                self._c200 = np.reshape(self._c200, (1, ))

        self._df['c200'] = pd.Series(self._c200, index=self._df.index)
        self._calculate_deltac()