New answers tagged

9

In Astropy, u.G represents a Gauss, not the gravitational constant. That's why you get the "A" in one of the error messages; it represents an ampere. To use the gravitational constant in your code, you need to use astropy.constants and replace u.G in your code with constants.G (or just add import astropy.constants as c and use c.G, if you prefer).


1

y_fit = ls.model(t_fit, best_frequency) I figured it out. The input t_fit in the code line above is taken as 0.0 to 1.0 DAYS instead of PHASES so the y_fit values are the values of a 1.2d orbit but only up to 1.0 days. If the t_fit range is set instead as (0.0 - 1/best_frequency), we get the full phase of the period orbit. To then plot this full orbit ...


Top 50 recent answers are included