Closed sriramsrao closed 2 years ago
The model in normal time and in folded form is already available, see the documentation. The keywords are
transitleastsquares.model_lightcurve_time
transitleastsquares.model_lightcurve_model
transitleastsquares.folded_phase
transitleastsquares.folded_y
transitleastsquares.model_folded_phase
transitleastsquares.model_folded_model
The above solution requires me to build the model by calling power()
. The APIs I am asking for are to reuse computed values for T0, period, and duration and generate the visualization curves.
First you must build (=calculate) the model. Afterwards, it becomes available and you can use it.
Agreed. In my use case, I build the model once and have all the params. I just want the visualization curves later (perhaps in a different program) and I don't want to rebuild the model each time.
I am bit puzzled why this is closed. If you look at the lightkurve APIs, they have APIs such as fold(), where you pass in T0, duration, etc. Are you closing the issue because this is an API/use case that you don't intend to support? Given that this is an open source project, would be good if you comment on this aspect. We are actively using TLS and having this API would be useful. Hence, all my comments.
I was under the impression that my explanation had solved your issue. I have used both TLS and lightkurve extensively and don't understand your issue. Please explain. Can you provide some sample code which doesn't work? Or sketch a use-case step by step?
Our use case is the following:
With Program 3, I have to recompute the model with TLS to get the visualization information. The model calculation is expensive (and is redundant), since I already have T0/period/epoch from Program 1. The ask here is that, if I can APIs that take the previously computed T0/period/epoch and just get me back the visualization without having to recompute the whole model, that'd speed up the visualization step (Program 3) considerably.
Hope this clarifies. Thanks.
You can do this without any changes to the code. Why would you re-compute the TLS model? The model is just a numpy array which you can store, save, etc. as you wish.
Had tried that. Was running into disk space issues (even though I had compressed the data) :).
The model arrays will be the same size as your input data. That can only be a few MB.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A call to
transitleastsquares.power()
returns the period information along with models for visualization purposes. It would be nice if the APIs could be enhanced to return the models for visualization purposes. For instance, the following APIsfold(T0, period, duration)
model(T0, period, duration)
could return the time series corresponding to the phase folded model and the model that TLS computes.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.