Nice plots with ds9 and lenstool

122 views
Skip to first unread message

Jean-Paul Kneib

unread,
Oct 7, 2014, 7:46:16 AM10/7/14
to Massey Richard, Mathilde Jauzac, Johan Richard, lens...@googlegroups.com
Dear Richard:

Let me answer this email. I copy it also to the lenstool email list for reference.

The current best way I found to do figures such as the figure 1 in the A2744 paper is by scripting
a number of xpa command, see e.g.: http://ds9.si.edu/ref/xpa.html

These xpa commands allow to control ds9 with almost all the ds9 capabilities.

To translate the lenstool output there is in particular the 'pelli' and 'pcl' perl scripts that you can use to respectively plot a image/source catalogue and plot the critical/caustic lines (that you can find in the lenstool/perl directory)


Loading an rgb image:

xpaset -p ds9 rgb
xpaset -p ds9 rgb channel red
cat ff_v1/hlsp_frontier_hst_acs-60mas-selfcal_abell2744_f814w_v1.0-epoch2_drz.fits| xpaset ds9 fits
xpaset -p ds9 rgb channel green
cat ff_v1/hlsp_frontier_hst_acs-60mas-selfcal_abell2744_f606w_v1.0-epoch2_drz.fits| xpaset ds9 fits
xpaset -p ds9 rgb channel blue
cat ff_v1/hlsp_frontier_hst_acs-60mas-selfcal_abell2744_f435w_v1.0-epoch2_drz.fits | xpaset ds9 fits

smoothing data:

xpaset -p ds9 rgb lock smooth yes
xpaset -p ds9 smooth radius 2
xpaset -p ds9 smooth function gaussian
xpaset -p ds9 smooth yes
xpaset -p ds9 smooth


adjusting scale:

xpaset -p ds9 rgb lock scale yes
xpaset -p ds9 rgb lock colorbar yes

xpaset -p ds9 rgb channel red   ; xpaset -p ds9 scale limits 0.0025 0.04
xpaset -p ds9 rgb channel green ; xpaset -p ds9 scale limits 0.004 0.06
xpaset -p ds9 rgb channel blue  ; xpaset -p ds9 scale limits 0.003 0.006
xpaset -p ds9 scale sqrt

xpaset -p ds9 zoom to 0.65
xpaset -p ds9 pan to 3.5890328 -30.401103 fk5 

overploting region files:

cat layout.reg | xpaset ds9 regions
cat zoomed_areas.reg | xpaset ds9 regions
cat bad_ID.reg | xpaset ds9 regions
cat mul_preHFF_all.reg | xpaset ds9 regions
cat mul_finalnew_sec.reg | xpaset ds9 regions
cat mul_finalnew_all.reg | xpaset ds9 regions

producing a postscript file (it may be enforce depending on the behaviour of ds9, this means you may have to press the "print" button of ds9) that you can then easily convert to pdf file

xpaset -p ds9 print destination file
xpaset -p ds9 print level 2 
xpaset -p ds9 print resolution 600
xpaset -p ds9 print 

Enjoy!

Cheers,

Jp






Begin forwarded message:

From: Richard Massey <r.j.m...@durham.ac.uk>
Subject: Nice plots from lenstool
Date: 2 October 2014 11:15:48 CEST
To: Mathilde Jauzac <mathild...@gmail.com>, Johan Richard <johan....@univ-lyon1.fr>

How do you make the nice (vector graphics) plots of an HST image and overlaid circles, like Figure 1 in A2744 paper? Is there some lenstool software that can convert an images.all/ds9.reg file to PDF?
I can output a png file from ds9, but I'd like to overlay ellipses/contours/critical lines onto it, and any that are present in ds9 at the time merely get bitmapped.

Thanks!
Richard





Jean-Paul Kneib
Professor - ERC Advanced Grant Laureate - Project "Light on the Dark"

Laboratoire d'Astrophysique
Ecole Polytechnique Fédérale de Lausanne  (EPFL)
Observatoire de Sauverny
CH-1290 Versoix
tel: +41 22 379 24 73 (Sauverny) +41 21 693 04 63 (Lausanne)



Reply all
Reply to author
Forward
0 new messages