Closed nsaikat closed 6 years ago
Sorry, looks like I changed something without checking some ramifications here. In save_gData.m, line 13, the radial basis functions are normalized by dividing the exponential by "k.^2". With xkratio=1, the first k value is equal to 0, so this division makes that basis function diverge. A quick fix would be to remove the division by "k.^2", or divide by "(k+0.1).^2" to avoid a singularity. The normalization shouldn't be needed, but I remember having a quick thought (that I didn't look much into) that it might help with the conditioning of the matrix and the SVD process. I will try to fix and properly test this as well when I get a chance, thanks for pointing it out.
Thanks for the suggestion! That way it's working fine...
Uploaded new code with the normalization (division by k.^2) removed. The simple test images still invert correctly so there is probably no matrix conditioning issue.
Great stuff! Very useful... While generating the .h5 file using save_gData.m, for xkratio=1, the SVD algorithm encounters a singularity (NaN or Inf). Any suggestion on how to avoid that? Thanks in advance!