X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 20 Mar 2007 03:17 PM by  anon
Building/applying masks on the fly in ENVI batch mode?
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
20 Mar 2007 03:17 PM
    I want to calculate statistics on a specifc spatial (and spectral) subset in a series of many registered images. Some data values, however, may be invalid (negative or zero) depending on the image. Without masking, my batch code is reallyl simple - something like , FOR i=0, nfiles-1 DO BEGIN ENVI_OPEN_FILE, infiles[i], R_FID=fid ENVI_DOIT, 'ENVI_STATS_DOIT', fid, DIMS=xdims, POS=xpos, MEAN=mean ENDFOR I'm not seeing an easy way to mask the invalid data before the ENVI_STATS_DOIT call. I suppose I could extract the data band by band, use WHERE to set the bad values to NaN, and then do the statistics myself with IDL calls, but that seems like an inelegant solution. Is there a batch-callable equivalent to the interactive mask building routines? Any other suggestions would certainly be appreciated. Thanks, Barry
    You are not authorized to post a reply.