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

m > k in logposterior #2

Open
daframe2r opened this issue Oct 20, 2024 · 1 comment
Open

m > k in logposterior #2

daframe2r opened this issue Oct 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@daframe2r
Copy link

Hello ! I am facing the issue below following the introduction tutorial, is it normal ? Thank you.

`TypeError Traceback (most recent call last)
Cell In[19], line 4
2 return ts.lnposterior(pv)
3 pool = Pool(8)
----> 4 ts.fit(niter=6000, npop=250, pool=pool, lnpost=lnpostf)

File c:\Users\quent\miniforge3\envs\easyts\lib\site-packages\easyts\easyts.py:579, in EasyTS.fit(self, niter, npop, pool, lnpost, population, initial_population)
576 x0[:, 3] = clip(normal(pv0[3], 0.01, size=npop), 0.0, 1.0)
577 x0[:, self._tsa._sl_rratios] = normal(sqrt(pv0[4]), 0.001, size=(npop, self.nk))
--> 579 self._tsa.optimize_global(niter=niter, npop=npop, population=x0, pool=pool, lnpost=lnpost,
580 vectorize=(pool is None))
581 self.de = self._tsa.de

File c:\Users\quent\miniforge3\envs\easyts\lib\site-packages\easyts\tslpf.py:606, in TSLPF.optimize_global(self, niter, npop, population, pool, lnpost, vectorize, label, leave, plot_convergence, use_tqdm, plot_parameters, min_ptp)
603 else:
604 population = self._de_population
--> 606 super().optimize_global(niter=niter, npop=npop, population=population, pool=pool, lnpost=lnpost,
607 vectorize=vectorize, label=label, leave=leave, plot_convergence=plot_convergence,
608 use_tqdm=use_tqdm, plot_parameters=plot_parameters, min_ptp=min_ptp)
609 self._de_population = self.de.population.copy()
610 self._de_imin = self.de.minimum_index

File c:\Users\quent\miniforge3\envs\easyts\lib\site-packages\pytransit\lpf\logposteriorfunction.py:149, in LogPosteriorFunction.optimize_global(self, niter, npop, population, pool, lnpost, vectorize, label, leave, plot_convergence, use_tqdm, plot_parameters, min_ptp)
147 else:
...
--> 239 raise TypeError('m > k must hold')
240 if xb is None:
241 xb = x[0]

TypeError: m > k must hold`

@hpparvi
Copy link
Owner

hpparvi commented Oct 24, 2024

Hi! Sorry, I haven't seen this error before. It's most likely caused by the spline interpolation. How many limb darkening and radius ratio knots are you using?

@hpparvi hpparvi self-assigned this Oct 24, 2024
@hpparvi hpparvi added the bug Something isn't working label Oct 24, 2024
@hpparvi hpparvi added this to the V1.0 milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants