Ed moved some subroutines to separate files; found an estimate for K and put it in  test_omp_thm2edit.m