California-Planet-Search / radvel

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

LinAlgError: cond is not defined on empty arrays #314

Closed SpaceyCaseyLynn closed 3 years ago

SpaceyCaseyLynn commented 4 years ago

I recently updated Radvel to 1.3.8, and now when I run the line "chains = radvel.mcmc(gppost,nrun=900,ensembles=3)" I get the following error "LinAlgError: cond is not defined on empty arrays". To the best of my knowledge gppost is not empty, and I'm able to make several different plots with it.

bjfultn commented 4 years ago

Are you trying to start a new fit from scratch or just run/re-run MCMC on a previous run? If the latter, you might try starting it from scratch.

Otherwise, I may have to try it out myself with your setup file and data. Please post if you are comfortable.

SpaceyCaseyLynn commented 4 years ago

I've tried re-creating the gppost file a bunch of times so I don't think it's that. I'm running it in an ipynb, which it won't let me attach as a file so I'll email it to you.

bjfultn commented 4 years ago

Has this been resolved? I never received the notebook file by e-mail.

SpaceyCaseyLynn commented 4 years ago

It hasn't been resolved, I'll resend the notebook!

SpaceyCaseyLynn commented 4 years ago

Hi Again,

I wanted to check in again and ask if you've had a chance to take a look at this (and if you've received the jupyter notebook).

Best, Casey

On Tue, Jun 16, 2020 at 10:26 AM BJ Fulton notifications@github.com wrote:

Has this been resolved? I never received the notebook file by e-mail.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/California-Planet-Search/radvel/issues/314#issuecomment-644993754, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRXDEUFWAHGGUXEFB2OUUTRW7IQHANCNFSM4NGWMD4Q .

bjfultn commented 4 years ago

It looks like I can get around this error by freeing up one or more of the GP parameters. So it seems like we can only run MCMC for GP posteriors when we have at least one of the GP parameters free. I'm not sure if this is a bug or a feature so I'm assigning to @sblunt to look into it.

SpaceyCaseyLynn commented 4 years ago

Ohhh okay! I can let some parameters vary. Don't feel like you or @sblunt need to address this right away.

sblunt commented 4 years ago

I'm having trouble reproducing this bug. I'm running the k2-131 GP example included in the radvel docs using the CLI. I can run the MAP fit and MCMC fit with no issue when I set all of the GP params to not vary. Would you all mind sharing the notebook containing the bug with me?

bjfultn commented 4 years ago

I just forwarded Casey's notebook to you @sblunt