rewrote replica solution as a grid search minimization over two variables (gridMin2d). It may take further tweeking of parameters such as N in gridMin2d, but this seems to give reasonable results for q0 that solve the F1 and F2 equations, which I believe are correct at lease within a reasonable regime. Next step is running compareSamplingReplicaGeneral_varyK to see what sort of plot I can generate. The good news is that the simulations appear to verify my replica results. Also it will be very good to try this with non-gaussian noise...