A 26-year-old woman is evaluated because she and her husband have been trying to conceive for 14 months without success. Her husband fathered a child in a previous marriage. Her medical history is notable for pelvic inflammatory disease, which was diagnosed and successfully treated at age 18 years. Her only medication is a prenatal vitamin.

Physical examination findings are unremarkable.

Which of the following studies is most likely to be diagnostic?