ellc icon indicating copy to clipboard operation
ellc copied to clipboard

rpoly fail, Python crash

Open shelleycheng opened this issue 6 years ago • 3 comments

Hi! I'm trying to fit a lightcurve of a system very near roche overflow, and I sometimes get the expected "star 1 exceeds limiting radius" result. However, sometimes I get a "ell_ell_roots: rpoly fail" error that prints out a list with NaNs and zeros. Python then crashes.

I'm wondering if there's a workaround to this issue? Any insights would be very helpful!

Here's what the Terminal output looks like:

ell_ell_roots: rpoly fail, a T NaN
NaN NaN NaN
NaN -1.0000000000000000 -1.4660523332313850E-002 -0.97144512031722485
2.5308722549527402E-002 -5.8516435879507334E-002 1.0824066953850998E-002
0.12480462418495529 0.12223997195976140 2.6197617077951593E-002 -
6.0631841597696981E-002 1.9701140691243557 4.7928494913314391E-002 -0.
38878985079685596 0.92132646326769452 NaN 0.0000000000000000 NaN
NaN NaN NaN
NaN NaN NaN
NaN 0.0000000000000000 NaN 1
.0000000000000000 0.0000000000000000 NaN NaN NaN
NaN NaN 0

shelleycheng avatar Aug 05 '19 07:08 shelleycheng

Dear Shelley, are you sure that ellc is a suitable model for your binary star? The ellipsoidal model in ellc is not a very good one for stars that are very close to their Roche lobe so the results you get will have quite a large systematic error.

the error message your sent that looks like ellc is being called with invalid input, e.g., with one star larger than its Roche lobe. I would need to know exactly what parameters were used in the call to ellc to investigate further.

-Pierre

pmaxted avatar Aug 05 '19 12:08 pmaxted

Dear Pierre,

Thank you for your reply! Do you know of any binary modeling tools that can model systems close to Roche overflow?

The parameters I used that caused the error are: r1/a = 0.1536142899428581 r2/a = 0.07680714497142906 sbratio = 0. incl = 75.0 [deg] q = 2.0 period = 32.83 [everything in days] a = 169.25 [Rsun] shape_1 = 'roche' shape_2 = 'roche' t_exp = 0.0208333 grid_1=grid grid_2=grid exact_grav=True f_s = 0.25291050714547003 f_c = -0.7113622673261641

The fit works if I have r1/a = 0.14770604802197895 = 25 Rsun/a, but fails when I set it to 26 Rsun/a=0.1536142899428581.

-Shelley

shelleycheng avatar Aug 05 '19 17:08 shelleycheng

Hi all, I am having this exact same issue. When rpoly fails, the entire Python kernel crashes. This makes it difficult to do any sort of optimization over the light curve parameters in case the radius reaches its Roche lobe.

danhey avatar Dec 01 '19 05:12 danhey