func (af *RFs) RFByNameTry(name string) (*RF, error) {
	rf := af.RFByName(name)
	if rf == nil {
		return nil, fmt.Errorf("Name: %s not found in list of named RFs", name)
	}
	return rf, nil
}
RFByNameTry returns RF of given name, nil and error msg if not found
package actrf
import (
	"fmt"
	"log"
	"github.com/emer/etable/etensor"
)
type RFs struct {
	NameMap map[string]int `desc:"map of names to indexes of RFs"`
	RFs     []*RF          `desc:"the RFs"`
}
func (af *RFs) RFByName(name string) *RF {
	if af.NameMap == nil {
		return nil
	}
	idx, ok := af.NameMap[name]
	if ok {
		return af.RFs[idx]
	}
	return nil
}