Minor corrections from the PR comments
RF: used lookup for the shm_basis