pro shapelets_plot_decomp, decomp, recomp, $
POLAR=polar, $
CARTESIAN=cartesian, $
COEFFICIENTS=coefficients, $
ERRORS=errors, $
NRAN=nran, $
TOP=top, $
NOOVER=noover, $
CRANGE=crange, $
CLOG=clog, $
CBAR=cbar, $
ISOTROPIC=isotropic, $
REAL=real, $
IMAGINARY=imaginary, $
COMPOSITE_RI=composite_ri, $
MODULUS=modulus, $
ARGUMENT=argument, $
COMPOSITE_MA=composite_ma, $
PHASE=phase, $
TITLE=title, $
XTITLE=xtitle, $
YTITLE=ytitle, $
FRAME=frame, $
CROSSHAIRS=crosshairs, $
_ref_extra = ex
;$Id: shapelets_plot_decomp.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_PLOT_DECOMP
;
; CATEGORY:
; Shapelets.
;
; PURPOSE:
; Repixellate a shapelet model (decomp structure) and display it.
;
; INPUTS:
; DECOMP - structure produced by shapelets_decomp
;
; OPTIONAL INPUTS:
; NRAN - Ignore coefficients with n outsdide of nran
; TOP - Keep top largest coefficients
; Plus many more of the usual plotting parameters.
; See shapelets_plot_image.pro for details.
;
; KEYWORD PARAMETERS:
; (DEFAULT) - Plot the reconstructed image.
; CART - Plot the Cartesian shapelet coefficients.
; POLAR - Plot the polar shapelet coefficients (these are complex -
; other keywords specify which aspect of them to plot.
; MODULUS - (DEFAULT) Plot the modulus of the polar shapelet coeffs.
; ARGUMENT - Plot the phases of the polar shapelet coefficients.
; REAL - Plot the real parts of the polar shapelet coefficients.
; IMAGINARY - Plot the imaginary parts of the polar shapelet coefficients.
; COEF - A synonym for CARTESIAN.
; PHASE - A synonym for ARGUMENT.
; ERROR - 1: Plot S/N of object or coefficients.
; 2: Plots absolute errors.
; CROSS - Overlays crosshairs on the centre of the basis functions.
;
; OUTPUTS:
; Plot drawn to STDOUT.
;
; OPTIONAL OUTPUTS:
; RECOMP - reconstructed image array
;
; MODIFICATION HISTORY:
; Mar 07 - Isotropic plotting of polar coefficients improved by RM.
; Jan 06 - Keywords for different plots of complex coefficients added by RM.
; Jul 05 - Ability to cope with polar decomp structures incorporated by RM.
; Mar 02 - Polar shapelet options (from shapelets_plot_decomp_polar.pro) added by RM.
; Dec 01 - Power spectrum, errors etc. incorporated by Richard Massey.
; Jul 99 - Written by Alexandre Refregier.
;-
COMPILE_OPT idl2, HIDDEN
; Test that the input is a decomp structure
if not shapelets_structure_type(decomp,message=message) then message,message
if decomp.type ne "decomp" then message,"This routine is for plotting decomp structures only!"
polar_input=decomp.polar
;
; Plot errors on coefficients if requested
;
if keyword_set(errors) then begin
if not keyword_set(title) then title=""
temp_decomp=decomp
if errors eq 1 then begin
temp_decomp.coeffs=abs(temp_decomp.coeffs)/temp_decomp.coeffs_error
title="S/N on coefficients "+title
endif else begin
temp_decomp.coeffs=temp_decomp.coeffs_error
title="Errors of coefficients "+title
endelse
shapelets_plot_decomp, temp_decomp, recomp, nran=nran, coef=coef, top=top,$
noover=noover,cbar=cbar,clog=clog,crange=crange, title=title,$
polar=polar, frame=frame, _extra= ex
endif else begin
;
; Set range of coefficients to include
;
if not keyword_set(nran) then nran=[0,decomp.n_max]
nran=0>nran[sort(nran)]
Return to the shapelets web page or the code help menu.
Last modified on 2nd Mar 2009 by
Richard Massey.