nanograv / enterprise_extensions

A set of extension codes, utilities, and scripts for the enterprise PTA analysis framework.
MIT License
27 stars 60 forks source link

Bug in `enterprise_extensions.sampler.JumpProposal.fe_jump`? #207

Open abhisrkckl opened 1 year ago

abhisrkckl commented 1 year ago

This function computes the Prior contribution to the Hastings factor as follows:

        hastings_extra_factor = self.params[self.pimap['log10_h']].get_pdf(log10_h_old)
        hastings_extra_factor *= 1/self.params[self.pimap['log10_h']].get_pdf(log10_h)
        hastings_extra_factor = self.params[self.pimap['phase0']].get_pdf(phase0_old)
        hastings_extra_factor *= 1/self.params[self.pimap['phase0']].get_pdf(phase0)
        hastings_extra_factor = self.params[self.pimap['psi']].get_pdf(psi_old)
        hastings_extra_factor *= 1/self.params[self.pimap['psi']].get_pdf(psi)
        hastings_extra_factor = self.params[self.pimap['cos_inc']].get_pdf(cos_inc_old)
        hastings_extra_factor *= 1/self.params[self.pimap['cos_inc']].get_pdf(cos_inc)

As it is, only the cos_inc contribution to the hastings_extra_factor is taken care of. I think the = operators for the other parameters except the first one (log10_h) should be changed to *=.