rpoleski / MulensModel

Microlensing Modelling package
https://rpoleski.github.io/MulensModel/
Other
53 stars 16 forks source link

bug in (`t_eff`, `u_0`) parameterization for parallax models with negative `u_0` #99

Open rpoleski opened 9 months ago

rpoleski commented 9 months ago

@przemekmroz informed me that he found bug in parallax calculation for model with t_E calculated from t_eff and u_0 for negative u_0. Trajectory calls ModelParameters.t_E for tau calculation. For this parameterization, ModelParameters.t_E returns self.t_eff / self.u_0, which is negative. We should add math.abs() in denominator or make a similar change. Other similar cases should be considered (e.g., t_E_1/2 for binary source models).

rpoleski commented 9 months ago

@przemekmroz - issue solved. I'm not closing this thread because there could be other similar bugs that should be corrected.