Giter Site home page Giter Site logo

Geometry fit uncertainty about frank HOT 7 OPEN

rbooth200 avatar rbooth200 commented on August 30, 2024
Geometry fit uncertainty

from frank.

Comments (7)

jeffjennings avatar jeffjennings commented on August 30, 2024

Just looking back at this, I've found with mock data in the last couple days that the uncertainty on the inc, PA and phase center as returned by the least squares optimizer in FitGeometryGaussian and FitGeometryFourierBessel can grossly underestimate the error (the true values being >> 3 sigma from the fitted values). Maybe not surprising, but just to note.

from frank.

jeffjennings avatar jeffjennings commented on August 30, 2024

A prior flat in cos(inc) is just prior = 1 / inc unless I'm mistaken.

from frank.

rbooth200 avatar rbooth200 commented on August 30, 2024

HI Jeff, thanks for this. Do you know whether the very large errors are associated with the fit getting stuck in a local minimum?

from frank.

jeffjennings avatar jeffjennings commented on August 30, 2024

I don't suspect so, only because the tendency to underestimate the errors is consistent across several initializations of a guess for the geometry (though all for the same mock dataset). But I could be wrong, and I haven't looked into this exhaustively.

I've also varied diff_step in least_squares (https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.least_squares.html) from 1e-3 to 1e2, which hasn't altered the results.

There might be some unique quirk to this dataset that makes the geometry fit difficult, though I don't see what that would be. I'm generating mock visibilities using galario and using estimate_weights though, so there could be potentially be contributions to the error upstream of the actual geometry fit. I added a couple plots to slack to show.

from frank.

rbooth200 avatar rbooth200 commented on August 30, 2024

It might be, but I suspect that the errors are just bad. That's sort of expected though

from frank.

jeffjennings avatar jeffjennings commented on August 30, 2024

Hey @rbooth200 do you want to apply the prior in cos(inc) to the geometry fitting routines? I think it should just be prior = 1 / inc.

In #164 I added a note to the docs about how the geometry fit won't be accurate for a disc that's highly non-Gaussian, like one with a cavity. For an uncertainty estimate on ~Gaussian discs, I can check if draw_bootstrap_sample will give a realistic uncertainty estimate. Shouldn't we also be able to get an estimate straight from FitGeometryGaussian and FitGeometryFourierBesselthough, since they both use least_squares?

from frank.

rbooth200 avatar rbooth200 commented on August 30, 2024

Can you check whether the bootstrap gives a reasonable uncertainty estimate?

However, I wonder if the best thing to do might be to note that these automated procedures are not perfect. We could edit the docs to discuss this better, suggest typical uncertainties and point to the appropriate papers that discuss it instead.

from frank.

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.