def extract_endmembers(self, hsi_3d, n_endmembers): hsi_2d = hsi_3d.reshape( (-1, hsi_3d.shape[2]) ) endmembers, indicies = profile_code(self.profile, self.profile_filename)(PPI)(hsi_2d, n_endmembers, self.n_skewers) return endmembers
def extract_abundance_maps(self, hsi_3d, n_endmembers): hsi_2d = hsi_3d.reshape( (-1, hsi_3d.shape[2]) ) abundance_maps = profile_code( self.profile, self.profile_filename)( self.model.fit_transform)(hsi_2d) abundance_maps = np.moveaxis(abundance_maps, 1, 0) abundance_maps = np.reshape(abundance_maps, (abundance_maps.shape[0], hsi_3d.shape[0], hsi_3d.shape[1])) return abundance_maps
def extract_endmembers(self, hsi_3d, n_endmembers): extractor = NFINDR() endmembers = profile_code(self.profile, self.profile_filename)( extractor.extract)(hsi_3d, n_endmembers) return endmembers