Skip to content
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

Implement more efficient pixel transforms from the SSHT package #283

Open
fbartolic opened this issue May 10, 2021 · 0 comments
Open

Implement more efficient pixel transforms from the SSHT package #283

fbartolic opened this issue May 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@fbartolic
Copy link
Collaborator

Currently, fitting for a model in pixel space using the linear transforms returned by the get_pixel_transforms method requires ~4l^2 pixels for a map of degree l. There are more efficient algorithms from the signal processing literature which require only ~l^2 pixels (paper) or ~2l^2 pixels (paper). The algorithm which requires ~l^2 pixels is implemented in the package SSHT. The package is written in C and Python, it provides the forward (Ylm -> pixels) and the inverse (pixels -> Ylms) transforms (see docs) and the adjoints of both transforms. It seems to be well maintained.

A related paper on sparse image reconstructions on the sphere defines the discrete TV norm on the sphere and the finite difference gradients of the pixel map in latitude and longitude which are needed to compute the norm. These finite difference operators differ slightly from the ones returned by get_pixel_transforms, the gradient operator in the latitude direction is the same (I think) but the one for the longitudinal angle is multiplied by 1/sin(theta) and they use additional regularization weights (q(theta_t) in the paper) to eliminate numerical instabilities close to the poles. In this paper, they claim that the "MW sampling algorithm" (the one which uses ~l^2 pixels) improves the sparsity of pixel maps when doing inference relative to an algorithm which uses twice as many pixels.

The drawback of this method is that is that you can't precompute the the transforms before doing inference so it might be that the increased evaluation cost of the model outweighs the the gains from reducing the number of parameters by half.

@rodluger, how complicated would it be to write a Theano Op which uses the SSHT package to evaluate the pixel transforms and the adjoints?

@fbartolic fbartolic added the enhancement New feature or request label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant