NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Data > IDLDocumentation > IDLDocumentationV1pt2 > GBTIDLPostageStampPlots
   Changes | Index | Contents | Search | Statistics | Jump to Topic

Postage Stamp Plots

In displaying PointMap data, or just for displaying multiple spectra, it can be convenient to display spectra as postage stamp plots. GBTIDL currently does not have any inherent support for postage stamp plots, but it is easy to use the IDL plotter to duplicate plots as one might see from CLASS, for example.

For instance, a 3x3 PointMap might be stored as calibrated, reduced spectra in an SDFITS file, with the first 9 records representing the map. These can be displayed in a postage stamp plot as follows:


  filein,'postage.fits'
  freeze
  !p.multi = [0,3,3]
  for i=0,8 do begin & $
      getrec,i & $
      x = getxarray() & $
      y = getdata() & $
      plot,x,y,xstyle=1 & $
  endfor
  unfreeze

For more flexibility in plot placement, the position parameter can be used, as in the following procedure:


pro plotpos,x,y,xpos,ypos,xsize,ysize
    if (n_elements(xsize)) eq 0 then xsize = 0.1
    if (n_elements(ysize)) eq 0 then ysize = 0.1
    freeze
    plot,x,y,position=[xpos-xsize/2,ypos-ysize/2,xpos+xsize/2,ypos+ysize/2], $
        /noerase, xstyle=1
    unfreeze
end

The procedure might be used as follows:


erase
getrec,0
plotpos, getxarray(), getdata(), 0.5, 0.5, 0.25, 0.25
getrec,1
plotpos, getxarray(), getdata(), 0.2, 0.5, 0.25, 0.25
getrec,2
plotpos, getxarray(), getdata(), 0.8, 0.5, 0.25, 0.25
getrec,3
plotpos, getxarray(), getdata(), 0.5, 0.2, 0.25, 0.25
getrec,4
plotpos, getxarray(), getdata(), 0.5, 0.8, 0.25, 0.25

This process could be encapsulated into a single, flexible procedure.

-- JimBraatz - 05 Aug 2005

Topic GBTIDLPostageStampPlots . { Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More }
Revision r1.1 - 05 Aug 2005 - 20:24 GMT - JimBraatz
Parents: IDLDocumentation > IDLDocumentationV1pt2
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.