Giter VIP home page Giter VIP logo

Comments (5)

martindevora avatar martindevora commented on July 23, 2024

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.

from allesfitter.

martindevora avatar martindevora commented on July 23, 2024

The difference is probably coming from the function using the fast_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.

from allesfitter.

MNGuenther avatar MNGuenther commented on July 23, 2024

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.)

from allesfitter.

martindevora avatar martindevora commented on July 23, 2024

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.

from allesfitter.

MNGuenther avatar MNGuenther commented on July 23, 2024

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!

from allesfitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.