priors.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:ExoSOFT 作者: kylemede 项目源码 文件源码
def __init__(self, ecc_prior=True, p_prior=True, inc_prior=True,
                 m1_prior=True, m2_prior=True, para_prior=True,
                 para_est=0, para_err=0, m1_est=0, m1_err=0, m2_est=0, m2_err=0,
                 ecc_beta_a=0.867, ecc_beta_b=3.03,
                 ecc_J08_sig=0.3, ecc_Rexp_lamda=5.12, ecc_Rexp_a=0.781,
                 ecc_Rexp_sig=0.272, ecc_ST08_a=4.33, ecc_ST08_k=0.2431,p_gamma=-0.7,
                 mins_ary=[],maxs_ary=[]):
        ## check min and max range arrays
        if (len(mins_ary)>1) and (len(maxs_ary)>1):
            self.mins_ary = mins_ary
            self.maxs_ary = maxs_ary
        else:
            raise IOError('\n\n No min/max ranges were provided to the priors object!!')
        ## push in two manual constants
        self.days_per_year = 365.2422
        self.sec_per_year = 60*60*24*self.days_per_year
        ## choices
        ## choices:'2e', 'ST08','J08', 'RayExp', 'beta', 'uniform'. Default is 'beta'.
        self.e_prior = ecc_prior
        ## `best-fit' alpha and beta from Kipping+2013
        self.ecc_beta = stats.beta(ecc_beta_a,ecc_beta_b) #https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.html
        ## 'best-fit' for the basic Rayleigh from Juric+2008
        self.ecc_J08_sig = ecc_J08_sig      ### Put this into the advanced settings ???
        ## `best-fit' alpha, lambda and sig from Kipping+2013
        self.ecc_Rexp_lamda = ecc_Rexp_lamda  ### Put this into the advanced settings ???
        self.ecc_Rexp_a = ecc_Rexp_a     ### Put this into the advanced settings ???
        self.ecc_Rexp_sig = ecc_Rexp_sig ### Put this into the advanced settings ???
        #https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rayleigh.html#scipy.stats.rayleigh
        self.ecc_R = stats.rayleigh() 
        #https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.expon.html
        self.ecc_exp = stats.expon()  
        ## `best-fit' for the Shen&Turner 2008 pdf
        self.ecc_ST08_a = ecc_ST08_a     ### Put this into the advanced settings ???
        self.ecc_ST08_k = ecc_ST08_k     ### Put this into the advanced settings ???

        #self.ecc_norm = stats.norm
        #self.ecc_norm_mean = ##
        #self.ecc_norm_sig = ##
        #self.ecc_norm.pdf(ecc,loc=self.ecc_norm_mean, scale=self.ecc_norm_sig)

        ## choices: power-law, Jeffrey's
        self.p_prior = p_prior
        self.p_gamma = p_gamma
        ## choices:sin, cos
        self.inc_prior = inc_prior
        ## choices:IMF, PDMF
        self.m1_prior = m1_prior
        ## choices:CMF, IMF, PDMF
        self.m2_prior = m2_prior
        ## choices:gauss
        self.para_prior = para_prior
        ## values necessary to calculate priors
        self.para_est = para_est
        self.para_err = para_err
        self.m1_est = m1_est
        self.m1_err = m1_err
        self.m2_est = m2_est
        self.m2_err = m2_err
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号