comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help with MNF in ENVI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help with MNF in ENVI [message #39136 is a reply to message #39128] Tue, 20 April 2004 18:08 Go to previous messageGo to previous message
Zhihong Pan is currently offline  Zhihong Pan
Messages: 1
Registered: April 2004
Junior Member
You are the man, Peter.

You got it all correct (it's ## if you want to know). I was messing with
evec but no luck. Thanks again.

Pan

PS, just read your reply again. Found a minor bug, for AVG, it's only
computed for the selected bands but stored in original order. So the
non-selected bands have zero in the array.

On Wed, 21 Apr 2004, Peter Mason wrote:

> Zhihong Pan wrote:
>> Hi, All
>>
>> First post here, need help for MNF transformation in ENVI program.
>>
>> I can use MNF_DOIT for transformation of an image. But now I want to
>> apply the existing MNF transformation to a few spectra but ENVI
>> doesn't support it. I assume the transformation matrix is saved in the
>> MNF statistics file but not sure about the details. Any comments
>> appreciated.
>>
>> BTW, this might not be the correct forum for ENVI question. Any
>> recommends of forums for ENVI program?
>>
>> Thanks
>
>
> It seems to be okay to post ENVI questions here. <cringes>
> Anyway... I was also faced with this issue a few years ago. I did some
> experiments and, IIRC, in an MNF stats file the forward transformation
> matrix is saved in the spot where the *covariance* matrix is usually saved.
> The MNF eigenvalues are saved in the eigenvalue spot. Not sure about the
> eigenvectors spot - possibly the reverse transformation matrix.
> It has been some time since I checked this and things might have changed,
> but assuming they haven't, this is how you'd get the goodies to do your own
> MNF transform:
> envi_get_statistics, stats_file_name, cpos=cpos, mean=avg, cov=fmnf,
> eval=mnfeval
> (You don't actually need MNFEVAL for the transform but it's handy for a
> plot.)
> More detail:
> The image mean (AVG) is always computed for all bands while the MNF stats
> can be computed for a subset. CPOS is an index array showing which bands
> were used. Last I checked, an ENVI stats file doesn't contain band
> wavelengths so the only check that you can do to see if the stats file
> *might* be spectrally compatible with your spectra is along these lines:
> Compare your full number of bands against N_ELEMENTS(AVG) and the size and
> contents of your selected-bands index array against CPOS.
> In order to do the transform you will have to extract the MNF's input
> channel subset from AVG:
> AVG_SUB=AVG[CPOS]
> The transform for a spectrum SPEC then goes something like this:
> (SPEC-AVG_SUB) ## FMNF
> ( # or ##? You ask too much of me :-) FMNF or TRANSPOSE(FMNF)? Again,
> you ask too much :-) A couple of experiments with an image and you'll be
> there.)
>
> BTW, if you are thinking of transforming, say, resampled spectral-library
> spectra using MNF stats calculated for an image, remember that it'll only
> work if the spectra are of the same kind as what's in the image (e.g., both
> reflectance) and are scaled the same (e.g., both 0 to 10000). (This in
> addition to having the same #bands and wavelengths.)
>
>
> HTH
> Cheers
> Peter Mason
>
>
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: xmanager to call object methods?
Next Topic: explicit redraw does nothing until expose(?) event - IDLitComponent propertysheets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:39:40 PDT 2025

Total time taken to generate the page: 1.35826 seconds