Parameter estimation in X-ray astronomy using maximum likelihood