A 34-year-old woman is evaluated for hirsutism and acne that began 4 months ago. She also reports that her voice has become deeper. Her menstrual periods have remained regular, occurring every 28 days.

She has one son 5 years of age. She reports that her pregnancy was uncomplicated and she had no difficulty conceiving. She had a tubal ligation following the birth of her child. She has a sister with polycystic ovary syndrome. She takes no medications.

On physical examination, blood pressure is 140/84 mm Hg, and pulse rate is 62/min. BMI is 21. She has hyperpigmented terminal hairs on the chin, neck, abdomen, and lower back and comedones and pustules on the face and upper back. There is frontotemporal hair loss. The remainder of the examination is unremarkable.

Laboratory studies:

Cortisol, free (urine)

26 µg/24 h (71.6 nmol/24 h)

Dehydroepiandrosterone sulfate

8.2 µg/mL (22.1 µmol/L)

Prolactin

8 ng/mL (8 µg/L)

Testosterone

96 ng/dL (3.3 nmol/L)

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