Fixed the problem with the coefficient calculation. Now the code will calculate the Q matrix for a set of baselines for as many spherical harmonics as desired. Note that to get one entry in the Q matrix is ~33 sec, so it will take a long time to run.

Also made a function to plot the Q matrix entry as a function of l and colored according to m.