GithubHelp home page GithubHelp logo

Comments (3)

rmjarvis avatar rmjarvis commented on June 1, 2024

On the plane back from Madrid, I realized that these estimators are actually just the normal xi+ and xi- for the cross correlation between the halo ellipticities and the sources, where the halo ellipticity is normalized to have |g| = 1 (i.e., it is just the phase g1 + i g2 = exp(i phi)).

I made a unit test to confirm this, which is now in the code here (on master, but it works with the current v3.2.1 release -- no extra source code required).

The basic code flow is along the lines of the following:

lens_absg = numpy.sqrt(lens_g1**2 + lens_g2**2)
lens_cat = treecorr.Catalog(ra=lens_ra, dec=lens_dec, g1=lens_g1/lens_absg, g2=lens_g2/lens_absg)
source_cat = treecorr.Catalog(ra=source_ra, dec=source_dec, g1=source_g1, g2=source_g2, w=source_w)
gg = treecorr.GGCorrelation(min_sep=1, max_sep=30, bin_size=0.1)
gg.process(lens_cat, source_cat)
gamma_4theta = gg.xim
gamma_const = gg.xip
gamma_4theta_x = gg.xim_im
gamma_const_x = gg.xip_im

The test I linked to doesn't actually use weights, but those are already implemented. And it uses x,y, just because it is easier to construct the test in Euclidean coordinates. But ra, dec would normally be used on real data.

from treecorr.

rmjarvis avatar rmjarvis commented on June 1, 2024

So, given the above, do you think there should be a helper function in TreeCorr for this? It's pretty straightforward, despite being non-obvious, so I'm not sure how helpful a helper function would actually be.

Perhaps just some additional documentation to point this out? Maybe in the GGCorrelation class doc string.

Or maybe just in your paper about this, you lay out the math to prove this point, in which case it would be clear to other people making this measurement what functions in TreeCorr to use.

from treecorr.

rmjarvis avatar rmjarvis commented on June 1, 2024

I think there is nothing further to do on this issue. Closing now.

from treecorr.

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.