[daip] BLANK-like operation

Eric Greisen egreisen at nrao.edu
Fri Jan 26 16:52:03 EST 2007


Joseph Lazio writes:

 > I have a spectral-line cube (actually a set of them).  What I'd like
 > to do is set a small rectangle within the larger image and have all of
 > the pixel values within that rectangle, on all planes, set to
 > magic-value blanks.
 > 
 > To make this more specific, consider a 512x512x15 cube (15 planes,
 > with each plane consisting of a 512x512 image).  I'd set a small
 > window, say, (20,20) as the bottom left corner and (30,30) as the top
 > right corner.  All of the pixels, on all 15 planes, within this window
 > are set to blank, but all of the other pixels are retained.
 > 
 > BLANK doesn't quite do this.  The best I've been able to devise is to
 > SQASH the image, BLANK the SQASH'ed image, then use the OPCODE='IN2C'
 > mode of BLANK to go back and blank the cube.
 > 
 > Am I missing the obvious?
 > 

Not so far as I know.  Simply blanking a rectangle in every plane was
not an operation that occurred to us.  The verb PUTVALUE (DOHIST=-2)
might be quicker than these elaborate methods.  Maybe I should make a
new verb to put a constant value incl magin blank into a BLC to TRC
region.  Pretty easy to do.

Eric Greisen




More information about the Daip mailing list