Code Monkey home page Code Monkey logo

Comments (3)

damonge avatar damonge commented on September 11, 2024

Hi @umilta
I think what you're doing should work. The main thing to remember is that, when one calls w.compute_coupling_matrix, the two fields one passes should have their true masks associated with them.
Note however, that if you try to use the systematics deprojection or purification functionality in NaMaster, it won't really work for f0, since these functions also need to know the mask.

To make things slightly less hackish, I'd do the following:

f_other = nmt.NmtField(apodized_mask, other_map)
w = nmt.NmtWorkspace()
# Divide by mask where it's not zero
map_unmasked = np.zeros_like(my_map)
map_unmasked[binary_mask>0.001] = my_map[binary_mask>0.001] / apodized_mask[binary_mask>0.001]
f0 = nmt.NmtField(apodized_mask, map_unmasked)
cl_decoupled = w.decouple_cell(nmt.compute_coupled_cell(f0, f0))

I agree that it'd be nice to be able to pass masked maps to NaMaster, so I'll open an issue to address that. Thanks!

from namaster.

damonge avatar damonge commented on September 11, 2024

@umilta this feature has now been implemented in the master branch.

from namaster.

umilta avatar umilta commented on September 11, 2024

Thanks!

from namaster.

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.