macro-ize amp/phase calculation