Improve code/documentation of plot.residuals
Starting with https://git.ligo.org/Calibration/pydarm/-/blob/master/pydarm/plot.py#L342, the code is not quite intuitive because there is no comment text for what is happening here.
Suggestions:
- Add a comment for this code block to explain what is being done
- Interpolate the complex valued model transfer function using
numpy.interp()
- Compute the residuals first (measured / model), then compute the magnitude and phase from the residuals.