IPAC Skyview Tips: ================== (http://www.ipac.caltech.edu/Skyview/) * To output statistics in a n x n box anywhere on an image: - sb - use left mouse button to interatively select regions. * To paint images in different frames with skyview, type: - fr <#> - then pa etc.. - border 0 - zp 10 (magnifies by 10) * To change pixel values interactive: - >pi x,y - zoom into pixel(s) - >set zap_value "whatever" - >zap (and click on left mouse button to zap, middle finishes) - write to new image: >write "new name" * To define an area in image for photometry etc: -command line, define circle (ci) or box (bo): > da "n" ci "r(arcmin)" "ra" dec" > da "n" bo x1 x2 y1 y2 where n = label for that area. -interactively: > da "n" (ci or bo) use right mouse button to change area size use left button to change postion on image * compute background: > ba use left mouse button to pick random points click middle button to quit and average those points * photometry in a given area: uses background estimate from above. > da "n" etc... etc.. from above > ex "n" * Order for photometry of a source (example): fr 1 - frame num to disp. pa fowlinearize4.fits - paint img. border 0 da 1 ci 5 97 220 - define data analysis region 1 = circle of radius 5 pixels centered on source at x,y = 97 220 ba 10 128 128 - compute background by averaging pixels within 10x10 box centered at position 128 128. ex 1 - perform photometry on data analysis region 1. * For complete list of commands: > ? * Adjust stretch in displaying image: > ra "min value" "max value" * For help on any command: > help "command" * To display image (fits files): > pa i013b2h0.fit > border 0 > zp 0.5 (display half the size) * nice colour table: > ct 6 * change equinox to J2000: > cs equ J2000 * place white border and display equ. grid lines with scale: > border > contourovl gridonly * mark or circle points on image from a data file. eg. plot coords from columns 1 and 2 from file "file.tbl" and place green circle of radius 5 pixels (pixel scale in fits header) > table photz_RADECs.txt mark $field1 $field2 circle green 3 * change coordinate system to iraf pixel coords: > cs iraf * display coords at a point in image using cursor: > pick * display value at pixel x,y: > pi "x,y" * display certain plane number in an image: > pl "p" > pa "image" > border 0 * write text anywhere in image: > an "text" * dump image to gif or jpeg (eg. for jpeg) by grabbing full screen (that may fall off your monitor): > sd fullscreen jpeg "file.jpg" * can put all commands into a script and execute with > take "script name" * multi-color overlays in skyview: method 1: create in memory in 24bit mode then dump memory to file: % skyview -n24 > frame noadv > map r > pa mosaic_ch3_shifted.fits > map g > pa mosaic_ch2_shifted.fits > map b > pa mosaic_ch1.fits > md NEPrgb.jpg 100 method 2: display on screen (using default bit mode) then dump to file: % skyview > frame noadv > map r > pa mosaic_ch3_shifted.fits > map g > pa mosaic_ch2_shifted.fits > map b > pa mosaic_ch1.fits > sd fullimage jpeg "NEPrgb.jpg" Before painting under either of the above methods, it is recommended you use "log" scaling and experiment with the stretch using: > mo log > ra -1s 30s * multi-color overlays in DS9: first execute: ds9 -rgb -red -green -blue The 3-color image will come up in the main DS9 display/GUI. A pop-up "RGB" window will give you control over the currently selected image with which you can adjust levels, scales, using the Scale -> Scale Parameters... menu option. IRAF Tips: ========== (http://iraf.net/irafdocs/) * Histograms in IRAF: > stplot > phist "image.fits" > phist "image.fits" z1=0. z2=2000 binwidt=50 > phist sur_from_raw1.fits[50:60,50:60,2] <-- image section from pl 2 (in epar file can overlay histograms by setting append=yes, also can add xlabel and ylabel) * To display FITS extensions as planes in a cube in DS9: > !ds9 -medatacube g2034413-512657.fits * To split FITS extensions in iraf: > fxsplit g1349469-210405.fits * plot all pixels in a row (e.g. row 1) > prow g1349469-210405.fits 1 * plot average of image rows (i.e. collapse vertically): > prows g1349469-210405.fits 34 50 * To execute IRAF commands, scripts from the unix shell, see: http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html * To list pixel values in any section of image. Here it's all pixels along x-axis and in row number 1 (a spectrum) from image extension number 8 in fits file [note extensions numbered 0..n]. Output is directed to text file: > listpix g2034413-512657.fits[7][*,1] wcs=world > g2034413-512657spec.txt * shift a 1-d spectral image to it's rest frame (de-redshift): > dopcor in.fits out.fits redshift > dopcor g2034413-512657.fits[7][*,1] g2034413-512657specRest.fits 0.127588 FITS/WCS-tools Tips: ==================== (http://tdc-www.harvard.edu/software/wcstools/wcsprogsi.html) * To "get" (thresholded) pixel values from a FITS image, create a simple 32-bit FITS image and "set" or copy these values into this new FITS image: > getpix -s -n 1 %10f -g 100 master.fits 1-1024 1-1024 > gtr100_master.txt > newfits -o -32 -s 1024 1024 out.fits > setpix @gtr100_master.txt out.fits * To remap pixels in an image (containing a WCS) to the WCS of another image, i.e., if you want to register the images for color overlays etc.. > remap -f -o where "useThisImgWCS.fits" contains the "global" WCS to tie to. note: can also specify "@filelist" at end for a list of inputs (type "remap" to get more command-line options). --- Last modified: 2008 January 18