UNDER DEVELOPMENT

The software package is currently being dramatically improved and updated.
This is a (very) old version, potentially with bugs.

  Shapelets web page     Shapelets IDL code     Installation     Help pages     Simulated images  
List of routines
Instrutions for general code
Instructions for image simulation code

Source code for simage_tests.pro:

You can also view the help page for this routine.

pro simage_tests,simfile,scat,scats=scats,scatn=scatn ;$Id: simage_tests.pro, v1.0$ ; ; Copyright © 2004 Richard Massey and Alexandre Refregier. ; ; This file is a part of the Shapelets analysis code. ; www.ast.cam.ac.uk/~rjm/shapelets/ ; ; The Shapelets code is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License as published ; by the Free Software Foundation; either version 2 of the License, 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 License for more details. ; ; You should have received a copy of the GNU General Public License ; 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: ; SIMAGE_TESTS ; ; CATEGORY: ; Shapelets image simulation. ; ; PURPOSE: ; Compares SExtractor statistics of real Hubble Deep Fields N&S with my ; simulated images. Output all in one file for convenience - not for paper. ; ; INPUTS: ; simfile - Filename of the simulated .fits image, w/o path or extn. ; scat[n,s] - SExtractor catalogue (sexcat structure) of simulated image ; (read in automatically the first time this routine is run). ; OPTIONAL INPUTS: ; scat[n,s] - SExtractor catalogue (sexcat structure) of HDF images ; (read in automatically the first time this routine is run). ; ; KEYWORD PARAMETERS: ; None. ; ; OUTPUTS: ; Various statistics, written to postscript file. ; ; MODIFICATION HISTORY: ; Mar 04 - Tidied up by RM. ; Apr 02 - Written by Richard Massey ;- zpoint=22.08 ; Read in simulated image data message,'Reading simulated data',/info if not keyword_set(scat) then shapelets_read_sexcat, scat, simfile ; Now we know the simulated image was OK, read in HDF data message,'Reading HDF data',/info if not keyword_set(scats) then shapelets_read_sexcat, scats, 'HDF-S_f814' if not keyword_set(scatn) then shapelets_read_sexcat, scatn, 'HDF-N_f814' ; Open output file ops,form=1,/nopub,file=get_path(3)+simfile+'.ps' ; ; ; Size-magnitude plane ; ; scat.mag=scat.mag+zpoint scatn.mag=scatn.mag+zpoint scats.mag=scats.mag+zpoint !p.multi=[0,2,2,0,0] !x.margin=[5.5,1.5] !x.margin=[24,-17] plot,scat.mag,scat.fwhm*0.0398,psym=3,xran=[18,32],/xsty,yran=[0,3], $ title="Simulated image "+simfile,xtitle='!6AB Magnitude',ytitle='FWHM [arcsec]' !x.margin=[5.5,1.5] plot,[0,0],[0,0],xsty=4,ysty=4,/nodata plot,scatn.mag,scatn.fwhm*0.0398,psym=3,xran=[18,32],/xsty,yran=[0,3],xtitle='!6HDF North' plot,scats.mag,scats.fwhm*0.0398,psym=3,xran=[18,32],/xsty,yran=[0,3],xtitle='!6HDF South' ;!x.margin=[10,4] !p.multi=0 ; ; ; Ellipticity distribution ; ; sime=(scat.a^2-scat.b^2)/(scat.a^2+scat.b^2) sime1=sime*cos(2.*scat.theta) sime2=sime*sin(2.*scat.theta) hdfne=(scatn.a^2-scatn.b^2)/(scatn.a^2+scatn.b^2) hdfne1=hdfne*cos(2.*scatn.theta) hdfne2=hdfne*sin(2.*scatn.theta) hdfse=(scats.a^2-scats.b^2)/(scats.a^2+scats.b^2) hdfse1=hdfse*cos(2.*scats.theta) hdfse2=hdfse*sin(2.*scats.theta) !p.multi=[0,1,2,0,1] plothist,sime1,bin=0.02,xran=[-1,1],yran=[0,120],title='!6e!d1!n', thick=5, $ xtitle='Mean: '+strtrim(amean(sime1)*100,1)+'% +/- '+strtrim(stddev(sime1)*100,1) oplot,indgen(100)/50.-1,110*exp(-(indgen(100)/50.-1-amean(sime1))^2/stddev(sime1)^2) plothist,hdfne1,bin=0.02,/over plothist,hdfse1,bin=0.02,/over,linestyle=3 plothist,sime2,bin=0.02,xran=[-1,1],yran=[0,120],title='!6e!d2!n',thick=5, $ xtitle='Mean: '+strtrim(amean(sime2)*100,1)+'% +/- '+strtrim(stddev(sime2)*100,1) oplot,indgen(100)/50.-1,110*exp(-(indgen(100)/50.-1-amean(sime2))^2/stddev(sime2)^2) plothist,hdfne2,bin=0.02,/over plothist,hdfse2,bin=0.02,/over,linestyle=3 ;plothist,hdfne1,bin=0.02,xran=[-1,1],yran=[0,100],xtitle='HDF North: '+ $ ; strtrim(amean(hdfne1)*100,1)+'% +/- '+strtrim(stddev(hdfne1)*100,1) ;plothist,hdfse1,bin=0.02,xran=[-1,1],yran=[0,100],xtitle='HDF South: '+ $ ; strtrim(amean(hdfse1)*100,1)+'% +/- '+strtrim(stddev(hdfse1)*100,1) !p.multi=0 ; ; ; Magnitude-number counts ; ; plothist,scat.mag,bin=0.2,xran=[18,32],/xsty,yran=[1,300],/ysty,$ thick=5,/ylog,xtitle='!6A-B Magnitude',ytitle='Number of objects' plothist,scatn.mag,bin=0.2,/over plothist,scats.mag,bin=0.2,linesty=3,/over ; ; Slightly more clever plot !x.margin=[8.5,1.5] yscale=2./0.05 ; binsize,area of field plothist,scat.mag,x,y,bin=0.5,/noplot,xran=[18,32] plot,x,y*yscale*(6/7.5),/ylog,xran=[19,31.5],/xsty,yran=[yscale,1000*yscale],/ysty,$ thick=5,psym=-3,$ xtitle='!6AB Magnitude',ytitle='!6N/mag/deg!u2!n' ;plothist,cat.sexmag,bin=0.05,/over plothist,scatn.mag,x,y,bin=0.5,/noplot & oplot,x,y*yscale plothist,scats.mag,x,y,bin=0.5,/noplot & oplot,x,y*yscale,linesty=3 !x.margin=[5.5,1.5] ; ; ; Size statistics ; ; plothist,scat.fwhm*0.0398,x,y,bin=0.02,/noplot plot,x,y*(6/7.5),xran=[0,2],/xsty,yran=[1,250],ysty=1,thick=5,psym=-3,$;/ylog,$ xtitle='!6FWHM [arcsec]',ytitle='!6Number of objects' $ ,ytickn=[' ',' ',' ',' ',' '];,yticks=5 plothist,scatn.fwhm*0.0398,bin=0.02,/over plothist,scats.fwhm*0.0398,bin=0.02,linesty=3,/over ; ; Slightly more clever plot ;yscale=5./0.05 ; binsize,area of field ;plothist,scat.mag,x,y,bin=0.2,/noplot,xran=[18,32] ;plot,x,y*yscale,/ylog,xran=[19,31],/xsty,yran=[yscale,300*yscale],/ysty,$ ; thick=5,psym=-3,$ ; xtitle='!6AB Magnitude',ytitle='!6N/mag/deg!u2!n' ;;plothist,cat.sexmag,bin=0.05,/over ;plothist,scatn.mag,x,y,bin=0.2,/noplot & oplot,x,y*yscale ;plothist,scats.mag,x,y,bin=0.2,/noplot & oplot,x,y*yscale,linesty=3 ;ell-mag !p.multi=[0,1,2,0,1] plot,scat.mag,sime1,psym=4,ytit='!6e!d1!n',xran=[18,32],/xsty oplot,scatn.mag,hdfne1,psym=3 oplot,scats.mag,hdfse1,psym=3 plot,scat.mag,sime2,psym=4,xtit='AB Magnitude',ytit='!6e!d2!n',xran=[18,32],/xsty oplot,scatn.mag,hdfne2,psym=3 oplot,scats.mag,hdfse2,psym=3 !p.multi=0 cps scat.mag=scat.mag-zpoint scatn.mag=scatn.mag-zpoint scats.mag=scats.mag-zpoint end

View the help page for this routine, return to the shapelets web page or return to the code help menu.


Last modified on 02nd May 2008 by Richard Massey.

Valid HTML 4.01!