Code for radio astronomy with an expectation-maximization algorithm for structured covariance estimation