!------------------------------------------------------------------------ ! P_LMV.GRAPHIC ! ! General Procedure to plot multiple contour maps of spectral line images ! Options: ! DO_CONTOUR do/not draw contours ! DO_BIT do/not plot bitmap ! DO_NICE do/not make a nice truncation for beam ! DO_MASK do/not mask some part for text ! ! Global variables defined in DEFINE.GRAPHIC ! ! Calls ! P_LOAD.GREG (to load images) ! P_HEADER.GREG (to plot header information) ! P_LEVELS.GREG (to compute automatic contour levels) ! P_SCALE.GREG (to compute scaling for bitmaps) ! P_BEAM.GREG (to plot the clean beam, if any) ! S.Guilloteau 15-Oct-1992 !------------------------------------------------------------------------ clear plot def real x2 dx y2 aamin aamax def double xmark ratio def integer m n n1 n2 imark nmap nadd def character cmark*12 def logical do_clean do_dirty do_coverage let do_clean beam_type.eq."CLEAN" let do_dirty beam_type.eq."DIRTY" let do_coverage extra.eq."COVERAGE" ! on error return sic\@ p_load.greg aaa ! Load image & compute extrema if needed ! sic\@ p_level.greg aaa ! Compute levels sic\@ p_scale.greg aaa ! Compute scaling sic\@ p_header.greg aaa ! Draw header sic\if do_color then sic\@ p_color.graphic ! Setup nice colour table endif ! rgdata aaa /variable if (aaa%angle.ne.0) then symbol option "/UNIT SEC" else symbol option "/ABSOLUTE" endif if size.eq.0 then limits /rg else if (size.gt.0) then limits size|2 -size|2 -size|2 size|2 seconds endif if (aspect.eq.0) then let ratio abs((user_xmax-user_xmin)|(user_ymax-user_ymin)) else let ratio aspect endif let box_aspect ratio let x2 box_xmax let y2 box_ymax if first.eq.0 then let n1 1 else let n1 first endif if last.eq.0 then let n2 aaa%dim[3] else let n2 last endif let nmap n2-n1+1 let nadd 0 if (do_clean.or.do_dirty) then let nadd nadd+1 endif if (do_coverage) then let nadd nadd+1 endif if ratio.gt.1.d0 then ! M > N let m int(sqrt((nmap+nadd)*ratio+1)) let n nint(m|ratio) if (m*n.lt.(nmap+nadd)) then let m = m+1 if (m*n.lt.(nmap+nadd)) then let n n+1 endif endif else let n int(sqrt((nmap+nadd)|ratio+1)) let m nint(n*ratio) if (m*n.lt.(nmap+nadd)) then let n = n+1 if (m*n.lt.(nmap+nadd)) then let m m+1 endif endif endif ! set expand min(6.0|(m+n),1.) let dx (x2-box_xmin)|n|ratio let dx min((y2-box_ymin)|m,dx) ! delete /variable mbox nbox ubox define integer mbox nbox /global define integer k istep if (step.lt.0) then let istep -1 let k n2+1 else let istep 1 let k n1-1 endif let mbox m let nbox n define real ubox[5,nbox,mbox] /global on error break for j 1 to m for i 1 to n if (do_tree) then gtvl\change directory