# take max pattern with max valueptn_used=np.sum(np.abs(self.fit_result),axis=0)>0# filter just used patternsatlas_ptns=atlas_ptns[ptn_used,:]# argmax on absatlas=np.argmax(np.abs(atlas_ptns),axis=0)+1atlas_sum=np.sum(np.abs(atlas_ptns),axis=0)# filter small valuesatlas[atlas_sum<1e-3]=0