-
Notifications
You must be signed in to change notification settings - Fork 2
Shapelets
An arbitrary image may be decomposed into a linear combination of 'shapelet' base functions. Generally a shapelet is an orthonormal polynomial (Hemite) multiplied by a Gaussian. There are rectangular and polar shapelets.
Shapelet decomposition is a compression mechanism: The number of coefficients or modes are generally much smaller than the number of image pixels. It normally scales with the square root of the number of pixels, i.e. n_1 x n_2 <<< l x m
For a source with freq(and time) varying flux, the coefficients will also be freq and time dependent. However, the basis functions will not change, provided there is no significant change in the source.
For a complete introduction please visit this web page. Here are some diagrams on how shapelets could be used for prediction. Here are some slides of my shapelet reconstruction of the A Team sources.
Shapelet coefficients can be stored in a 2D n_1 by n_2 'shapelet_funklet' with time-freq dependence. However, we cannot use a 4D funklet because the coefficients are independent in n_1 and n_2.
A ShapeletImageTransform node could use a shapelet_funklet obtained from its MeqParm child. When presented with a request for 2D l,m image coordinates, it reconstructs a Result for that l,m grid. As long as the grid does not change, the basis vectors will not change so multiple images can be constructed for different coefficient values using the same basis.
A ShapeletVisTransform node returns source visibilities for a particular interferometer, for a particular time-freq domain. It does this by using uv plane shapelet basis functions. (Note: for a given image plane shapelet decomposition there is an analytical uv plane equivalent.) This operation could be done using the Compounder node. The children will have:
- A MeqParm node that returns the shapelet_funklet or mode coefficients
- A grid child that returns the u,v,w coordinates
- Total image plane effects.. for this interferometer The image plane effects could be applied to the image in the l,m plain and then redecomposed to shapelet coefficients to predict visibilities in the uv plane.
Applications: Source extraction, Floptics
Implementation: I have already implelemted rectangular shapelet decomposition. I will develop this as an external library that could be used in MeqTrees as well as in standalone applications. Here are my thoughts on implementing Shapelets in MeqTrees.
- Initially the shapelet decomposition of FITS images will be done offline. This will enable us to test different decomposition methods for speed and accuracy.
- After the decomposition, the coefficients and basis functions will be stored in a way so that they could be read into MeqTrees.
- There will be two nodes to predict flux in the image plane and uv plane
- There are different ways to find the shapelet decomposition. First, because we have an orthonormal basis, we can just solve the Linear Least squares (LLS) problem by multiplying with the Hermitian transpose of the basis matrix. However, the discrete basis vectors are not entirely orthonormal due to finite precision errors and non uniform grids. So the best way to find the decomposition is by treating the basis to be non orthonormal. There is a tradeoff in performace and accuracy. Moreover, there are several ways to solve the LLS problem. First, we can solve it by using the Moore-Penrose inverse or LU/QR decomposition. Secondly we can solve it by using the SVD of the matrix. Then again, there are different ways to find the SVD (divide and conquor, QR-RQ iteration etc. etc.)
- There is also the problem of finding the right linear transform for the decomposition. We need to minimize the number of modes as well as reconstruction error. Is this a non convex problem? (has a Pareto optimal solution?). So we should strive to find the solution by ways that can handle non convex optimization (genetic algoritms).
- Lets not forget about thresholding too. First, using histograms we could cutt of noise pixels in the image from appearing in the LLS equation (reduction of rows). Secondly, after decomposition, we can cut off modes with small coefficients (reduction of columns).