riogroup / SORA

MIT License
15 stars 12 forks source link

LightCurve only saves the last fit as complete model #9

Closed Bmorgado19 closed 4 years ago

Bmorgado19 commented 4 years ago

If the user fits the immersion and emersion separately, for instance, only the last one will be saved as LightCurve.chisquare, _LightCurve.modelgeometric, _LightCurve.modelfresnel and _LightCurve.modelstar. This issue probable requires a new method to save the models and ChiSquare within the LightCurve.

altairgomes commented 4 years ago

The immersion and emersion times are correctly saved separately. So, I think an easy way to solve this issue is generating the model when they are called using a property decorator instead of saving them.

Bmorgado19 commented 4 years ago

As suggested by @altairgomes. In a new version (v0.X), the light curve complete model should not be saved and only created as been called, using the property decorator. However, this will demand a complete restructuration of the function LightCurve.occ_model() and other functions within the LightCurve Class. This is a topic to be studied.

altairgomes commented 4 years ago

The correction has been made and will be available in v0.1.1.