function shapelets_shapecat2decomp, shapecat, id, $ OVERSAMPLE=oversample, $ INTEGRATE=integrate, $ V1=v1, $ N_PIXELS=n_pixels ;$Id: shapelets_shapecat2decomp.pro, v2$ ; ; Copyright © 2005 Richard Massey and Alexandre Refregier. ; ; This file is a part of the Shapelets analysis code. ; www.astro.caltech.edu/~rjm/shapelets/ ; ; The Shapelets code is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public Licence as published ; by the Free Software Foundation; either version 2 of the Licence, or ; (at your option) any later version. ; ; The Shapelets code is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public Licence for more details. ; ; You should have received a copy of the GNU General Public Licence ; along with the Shapelets code; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ; ;+ ; NAME: ; SHAPELETS_SHAPECAT2DECOMP ; ; CATEGORY: ; Shapelets. ; ; PURPOSE: ; Extracts one (decomp structure) object from a (shapecat structure) ; catalogue. ; ; INPUTS: ; SHAPECAT - Shapelet catalogue structure. Can contain thousands of ; objects. ; ID - If the catalogue contains more than one object, specify ; which one of them is to be converted. ; ; OPTIONAL INPUTS: ; OVERSAMPL- Oversampling amount in decomp structure. ; DEFAULT: specified in shapelets_decomp_create.pro ; ; KEYWORD PARAMETERS: ; INTEGRATE- Integrate basis functions within pixels. ; DEFAULT: specified in shapelets_decomp_create.pro ; V1 - Assume shapelet coefficients are stored as a_ij/a_00, as ; in version 1 of shapelet code. Default is now just a_ij. ; ; OUTPUTS: ; DECOMP - Cartesian decomp structure containing all of the information ; that it is possible to reasonably extract from a catalogue. ; ; MODIFICATION HISTORY: ; Jul 07 - Elliptical shapelet basis functions allowed by RM. ; Jul 05 - External decomp creation routine incorporated by RM. ; Jun 05 - Polar flag added to decomp structures by RM. ; Apr 05 - Bug fixed in determination of n_pixels by JB. ; Jan 05 - N_pixels/centroid consistent with shapecats implemented by RM. ; Oct 04 - N_PIXELS keyword added by Joel Berge. ; Aug 04 - Inter-pixel centroid position conserved by RM. ; Jun 04 - Integers changed to long integers by RM. ; Apr 04 - Convention on storage of aij/a00 to aij changed by RM. ; Mar 04 - Tidied up by RM. ; Apr 02 - Can now take polar catalogues/objects as input. ; Dec 01 - Written by Richard Massey. ;- ; Initiliase variables COMPILE_OPT idl2 on_error,2 ; Maintain backwards compatibility if not shapelets_structure_type(shapecat,message=message) then message,message if not tag_exist(shapecat,"sextractor") then shapecat=create_struct(shapecat,"sextractor",0B) if not tag_exist(shapecat,"theta_zero") then shapecat=create_struct(shapecat,"theta_zero",fltarr(shapecat.n)) if not tag_exist(shapecat,"basis_ellipticity") then shapecat=create_struct(shapecat,"basis_ellipticity",complexarr(shapecat.n)) ; Parse inputs if not keyword_set(id) then id=0 if id ge shapecat.n or id lt 0 then $ message,"Object #"+strtrim(string(id),2)+" does not exist in this catalogue of only "+strtrim(string(shapecat.n),2)+" objects!" n_max=shapecat.n_max[id]
Return to the shapelets web page or the code help menu.
Last modified on 2nd Mar 2009 by Richard Massey.