Had to convert NaNs in returned json script so that the javascript encoder could decode it. JSON specification does not handle NaNs or infinities. Seems inappropriate for scientific use