astro-informatics / purify

Next-generation radio interferometric imaging.
https://astro-informatics.github.io/purify
GNU General Public License v2.0
16 stars 11 forks source link

Run Forward Backward test with TensorFlow model #324

Open tkoskela opened 1 year ago

tkoskela commented 1 year ago

We should now be able to repurpose

https://github.com/astro-informatics/purify/blob/5833dbd35f214212aa17c368984bcae180cf5dee/cpp/tests/algo_factory.cc#L132

To run with the TensorFlow model

mmcleod89 commented 1 year ago

First attempt at this has led to a failing test, which converges on a largely uniform solution. tf_output solution

In both my test and in a python based test the initial imaginary component of the image, which should in theory always be zero, is quite large at first and falls in significance with subsequent iterations. Regarding the relationship with SOPT tests of the FB + TF functionality:

Given that the TF model works well in SOPT within the limited scope of real images simply sampled, it could be that the problems originate in purify and that either Phi has some issues or the complex image vector contains important information in the imaginary component that can't be thrown away. Some more testing of FB+TF in sopt might be helpful, but it's difficult to think of a good complex test case given that TF is supposed to only take real values and the image should always be real in the ideal case. Possibly we can take the example image used by Tobias and test this within SOPT to see if this is a purify issue or a sopt issue.