California-Planet-Search / radvel

General Toolkit for Modeling Radial Velocity Data
http://radvel.readthedocs.io
MIT License
57 stars 52 forks source link

Emcee ensemble error with MCMC #329

Closed jkteske closed 3 years ago

jkteske commented 3 years ago

I'm encountering the following error in trying to run the MCMC in RadVel:

File “/Users/jteske/anaconda/envs/python3/bin/radvel”, line 11, in sys.exit(main()) File “/Users/jteske/anaconda/envs/python3/lib/python3.6/site-packages/radvel/cli.py”, line 194, in main args.func(args) File “/Users/jteske/anaconda/envs/python3/lib/python3.6/site-packages/radvel/driver.py”, line 192, in mcmc save=args.save, savename=backend_loc, proceed=args.proceed, proceedname=backend_loc) File “/Users/jteske/anaconda/envs/python3/lib/python3.6/site-packages/radvel/mcmc.py”, line 360, in mcmc for sample in sampler.sample(p1, store=True): File “/Users/jteske/anaconda/envs/python3/lib/python3.6/site-packages/emcee/ensemble.py”, line 254, in sample “Initial state has a large condition number. ” ValueError: Initial state has a large condition number. Make sure that your walkers are linearly independent for the best performance (python3) bash-3.2$

I'm trying this ("radvel mcmc -s file.py") on a file that worked previously, as recently as an hour ago, and I have made no upgrades/updates/downgrades to RadVel or python or any other packages. Any advice on what might be going wrong? I already tried restarting everything. :) I'm using RadVel version 1.3.2 and emcee version 3.0.2.

Thanks,

Johanna

bjfultn commented 3 years ago

This might be caused by a poorly constrained model. How many planets are you trying to fit and how many RVs?

jkteske commented 3 years ago

Yes, I think that is the issue. This was for a two planet system with about 50 RVs. When I add tighter priors, I do not get the error. I was surprised, though, that this was the first time I ever saw this error, when I've fit systems with a higher number of planets and/or more RVs before.

bjfultn commented 3 years ago

@jkteske do you think we understand this sufficiently to close this issue?

jkteske commented 3 years ago

No, I haven't had the chance to go back and test this further. But you can close the issue if you want and I'll reopen it again if I run into related problems. :)