2806
How to use a mask band in MNF_DOIT
This Help Article provides an example of how to use a mask band in ENVI's MNF_DOIT routine, which requires the use of undocumented keywords. As with any undocumented code, it is not officially supported by Exelis VIS and may change in a future version of ENVI.
To use a mask in MNF_DOIT is not unlike other routines but it is not currently documented. The M_FID and M_POS keywords are used to specify the FID and band for the mask. A third keyword, 'ZERO' should also be set to a value of 1 in order to specify that the areas outside of the mask should be set to 0.
pro example_mnf_doit_with_mask
envi_open_file, 'bhtmref.img', r_fid=fid
envi_file_query, fid, dims=dims, ns=ns, nl=nl, nb=nb
pos = lindgen(nb)
out_name = 'batch_mnf.img'
envi_open_file, 'bh_mask.img', r_fid=m_fid
m_pos = 0
envi_doit, 'mnf_doit', $
fid=fid, pos=pos, dims=dims, $
sd_dims=dims, out_name=out_name, m_fid=m_fid, m_pos=m_pos, zero=1, $
in_memory=0, sta_name='', /no_plot, $
shift_diff=1, r_fid=r_fid
end
-----------------