Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pint.mcmc_fitter.CompositeMCMCFitter is broken #1510

Open
abhisrkckl opened this issue Jan 19, 2023 · 0 comments
Open

pint.mcmc_fitter.CompositeMCMCFitter is broken #1510

abhisrkckl opened this issue Jan 19, 2023 · 0 comments

Comments

@abhisrkckl
Copy link
Contributor

This class is a Fitter for dealing with multiple sets of TOAs at the same time with a single model (according to the docstring). I get an exception when I try to instantiate it.

This class is not covered by any tests. That's why this error went unnoticed thus far.

from pint.models import get_model_and_toas
from pint.config import examplefile
from pint.mcmc_fitter import CompositeMCMCFitter, lnlikelihood_chi2
from pint.sampler import EmceeSampler

m, t = get_model_and_toas(parfile, timfile)
ftr = CompositeMCMCFitter([t], m, sampler, [lnlikelihood_chi2])

Error:

TypeError                                 Traceback (most recent call last)
Cell In[19], line 1
----> 1 ftr = CompositeMCMCFitter([t], m, sampler, [lnlikelihood_chi2])

File ~/miniconda3/envs/pint-devel/lib/python3.10/site-packages/pint_pulsar-0.9.2+177.g9741c898-py3.10.egg/pint/mcmc_fitter.py:593, in CompositeMCMCFitter.__init__(self, toas, model, sampler, lnlikes, **kwargs)
    590 self.minMJD = kwargs.get("minMJD", 0)
    591 self.maxMJD = kwargs.get("maxMJD", 100000)
--> 593 self.fitkeys, self.fitvals, self.fiterrs = self.generate_fit_keyvals(
    594     phs, phserr
    595 )
    596 self.n_fit_params = len(self.fitvals)
    598 self.numcalls = 0

TypeError: MCMCFitter.generate_fit_keyvals() takes 1 positional argument but 3 were given
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant