File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,36 @@ def compute_light_travel_correction(jd, d_obs):
437437 return jd_lt
438438
439439
440+ def estimate_axes_ratio (residuals , R ):
441+ """Estimate the axes ratio of a SSO from the residuals of the sHG1G2 model and its oblateness R.
442+
443+ Parameters
444+ ----------
445+ residuals: np.array
446+ Residuals (observed - model) of the SSO with sHG1G2 model
447+ R: float
448+ Oblateness parameter of the sHG1G2 model
449+
450+ Returns
451+ -------
452+ a_b, a_c: float
453+ a/b and a/c axes ratio
454+ """
455+ # Estimate the amplitude of the lightcurve from residuals
456+ # Taken at 2 sigma
457+ amplitude = np .std (residuals ) * 2.0
458+
459+ # Estimate the a/b ratio
460+ a_b = 10 ** (0.4 * (amplitude * 2 ))
461+
462+ # Estimate the a/c ratio (and force c<b)
463+ a_c = (a_b + 1 ) / (2 * R )
464+ if a_c < a_b :
465+ a_c = a_b
466+
467+ return a_b , a_c
468+
469+
440470if __name__ == "__main__" :
441471 """Execute the unit test suite"""
442472
You can’t perform that action at this time.
0 commit comments