There is Krichever's algebro-geometric construction of solutions to the KP equations starting from a curve X together with extra data.
There is a way to find the spectral curve given a point of the Sato Grassmannian parametrizing solutions of KP equations, which is discussed here
Question: if I apply Krichever construction to a curve X with extra data, getting a point in the Sato Grassmannian, and then find the spectral curve of this point as above, will I get back the curve X?