Open dennisai opened 6 years ago
Same problem here with NFINDR. As a workaround I fetch the indices like this:
E = nfindr.extract(img, endmember_n, maxit=5, normalize=False, ATGP_init=True, mask=mask)
idx = [np.where((img[:,:]==e).all(-1)) for e in E]
I take note. Thanks
2018-02-01 9:27 GMT-05:00 Stefan Blumentrath notifications@github.com:
Same problem here with NFINDR. As a workaround I fetch the indices like this:
E = nfindr.extract(img, endmember_n, maxit=5, normalize=False, ATGP_init=True, mask=mask) idx = [np.where((img[:,:]==e).all(-1)) for e in E]
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ctherien/pysptools/issues/5#issuecomment-362281498, or mute the thread https://github.com/notifications/unsubscribe-auth/AQILNakEzyG2oeck0EU-IhvZIxZ3Hc0Xks5tQcnAgaJpZM4RN9bc .
If I use a mask for the end member extraction algorithm (e.g. FIPPI), then it calls the compress method on the HSI cube. I've pasted the source code below.
Then if we get the indexes of the endmembers later on, won't be computing the wrong indexes, since the index i will pertain to the compressed array (see code below)?