added WCS-based pv extraction along with robust cube shape checkign