A 53-year-old woman is evaluated for a 3-month history of progressively worsening exertional dyspnea and chest pressure. She has not had fever, cough, sputum production, or weight loss. Four months ago she underwent left shoulder arthroplasty. Eighteen months ago she had a right lower extremity deep venous thrombosis attributed to hormone replacement therapy. Hormones were discontinued, and she completed a 6-month course of warfarin. She takes no medications at this time.

On physical examination, temperature is 36.0 °C (96.8 °F), blood pressure is 130/74 mm Hg, pulse rate is 90/min, and respiration rate is 18/min; BMI is 26. Oxygen saturation is 89% breathing ambient air. Pulmonary examination reveals clear lung fields. Cardiac examination reveals a single loud S2. There is no peripheral edema.

Laboratory studies, including a complete blood count and electrolyte measurement, are normal.

Chest radiograph shows no cardiopulmonary abnormalities. Transthoracic echocardiogram shows normal left ventricular and right ventricular function, normal valves, and a right ventricular systolic pressure of 52 mm Hg. Pulmonary function testing reveals an isolated reduction in diffusing capacity. Bilateral lower extremity venous ultrasound shows no evidence of recurrent deep venous thrombosis.

Which of the following is the most appropriate diagnostic test to perform next?