The shapelet coefficients are stored in a specific order in both the decomp and shapecat strucutres. This routine creates arrays to index the coefficients with n1 and n2 (or n and m), assuming they are in this specific order. All you need to enter is the n_max for that decomposition.
Note that changing the order of the shapelet coefficients (or changing the simple way that they are truncated at some value of n) in either structure type is not advised, even though shapecats come with a built-in index. I have tried to write all of the routines to create an index with shapelets_make_nvec.pro to ensure that they are looking at the right coefficients at the right time. However, I have never tried changing their order, and indexing things differently, so I don't know if this centralised technique is 100% watertight.
See also the header below, which has been extracted from the source code for this routine.
; NAME: ; SHAPELETS_MAKE_NVEC ; ; PURPOSE: ; Set up look-up tables to specify which number in a vector of shapelet ; coefficients corresponds to which n1 and n2, or which nr and nl. ; ; CATEGORY: ; Shapelets. ; ; INPUTS: ; n_max - Highest n to go up to. ; ; KEYWORD PARAMETERS: ; None. ; ; OUTPUTS: ; n1,n2 - Coefficient number vectors. ; n_coeffs - Optionally returned containing total number of coefficients. ; ; EXAMPLE USE: ; A vector of Cartesian shapelet coefficients can be indexed using: ; shapelets_make_nvec, n_max, n_1, n_2 [,n_coeffs] ; ; A vector of polar shapelet coefficients can be indexed using: ; shapelets_make_nvec, n_max, n, m, /POLAR [,n_coeffs] ; or ; shapelets_make_nvec, n_max, n_r, n_l [,n_coeffs] ; n=n_r+n_l ; m=n_r-n_l ; ; MODIFICATION HISTORY: ; Jul 10 - EXPONENTIAL option added by RM. ; Jul 07 - Fixed to work with old versions of IDL by RM. ; Jul 05 - POLAR option added by RM. ; Nov 01 - Written by Richard Massey.
View the full source code for this routine, return to the shapelets web page, or return to the code help menu.
|Last modified on 2nd Mar 2009 by Richard Massey.|