Skip to content

Should mappers be recovered from map metadata? #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ntessore opened this issue Oct 23, 2024 · 1 comment
Open

Should mappers be recovered from map metadata? #210

ntessore opened this issue Oct 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ntessore
Copy link
Contributor

Currently, the transform() function requires fields and maps. However, the fields are only required to recover the mapper for each map, and call its .transform() method.

Alternatively, we could return to a system where the mappers can be reconstructed from the metadata of each map. The main reason this was abandoned was that it made it harder to use Heracles with external maps which don't have the required metadata. However, the metadata for external maps needs to be updated anyway even now (#201).

@ntessore ntessore added the question Further information is requested label Oct 23, 2024
@ntessore
Copy link
Contributor Author

To work with external maps, I could imagine a convenience function like the following:

mapper = heracles.healpy.HealpixMapper(nside, lmax)

m = hp.read_map("external_map.fits")
mapper.set_for_map(m, spin=2)

This could also check that the map is compatible with the given mapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant