Closed martindevora closed 3 years ago
I found out that one of the midtransit times returned by get_tmid_observed_transits
is out of the data. Therefore the array usage fails to retrieve any points.
The difference is probably coming from the function using thefast_fit_width
setting as window:
tmid_observed_transits = get_tmid_observed_transits(x, params_median[companion+'_epoch'], params_median[companion+'_period'], base.settings['fast_fit_width'])
meanwhile the single transit data for the plot is extracted from the time series using the window
parameter coming from the kwargs:
ind = np.where((x >= (t - window/2.)) & (x <= (t + window/2.)))[0]
In my case, for the first companion, the values are:
window = 0.333333 #which is the default 8./24. given by the function
fast_fit_width = 0.7213164833452207 #given by the allesfitter settings file.
Given the previous information, either you would have to unify the width parameter used for both calculations or you need to check the length of the ind
variable before doing array operations based on it. I will do some tests.
Kind regards.
Hi @martindevora,
Thanks for digging into this and elaborating your findings! I assume this means you were able to solve the problem fully by yourself then?
I remember there were some issues with using window = fast_fit_width, hence I chose the 0.33333 as a fixed value that seemed to work well in all test cases. Of course, there is always a break point. I'll monitor it and come back to this when a similar issue occurs again.
(Thanks for your patience! This fell through the cracks while I was moving from MIT to ESA this summer.)
Hi! Thanks for answering.
I came up with a home-made solution that works well but I think that Allesfitter needs to handle it too. I can suggest a Pull Request and if you find it fine merge it into your main branch. Is it ok?
Regards.
Hi @martindevora!
Thanks again for providing all these insights, that is super helpful. I actually came to discuss a related issue with another user yesterday, and that led me to make the zoom windows for the plots more dynamic - i.e., automatically choose a zoom window that is 3 * the median of the fitted transit duration. In that process, I also updated the redundancy / contradiction of the parameters "window" and "fast_fit_width" from the code lines you copied above. I also tested it all on your fit_0.zip attached above, and it ran well.
All updates are in v1.2.7 (pip-installable by this evening).
Feel free to reopen this in case you encounter other issues with the new fix!
Hello, I launched a fit for 3 planets. It seemed to run fine, even though it took 14 hours : ) The problem appeared when calling
allesfitter.ns_output
. This is the stack I found:Running allesfitter 1.2.2 version with Python 3.8.
Results: Only the PDFs appear in the results folder together to the log files, which are not showing the exception. I'm attaching my working allesfitter folder so you can try debugging this. Expected: I'm missing the rest of files with the fit data, like the ns_table and ns_derived_table CSVs.
fit_0.zip
Can you tell whether it is a coding bug or I did something wrong with the settings or params files?
Kind regards, Martín.