Add method to PortMapper to get ports by applying selection function or index array to mapped data. Small tweak to base.py demo.