mreineck / ducc

Fork of https://gitlab.mpcdf.mpg.de/mtr/ducc to simplify external contributions
GNU General Public License v2.0
13 stars 12 forks source link

adjoint normalising factor for vis2dirty #33

Closed Joshuaalbert closed 3 months ago

Joshuaalbert commented 3 months ago

Am I correct that the adjoint normalising factor for vis2dirty is 4 / (num_freqs * (4 * num_rows - sqrt(8 * num_rows + 1) - 1)) such that,

num_rows = len(uvw)
num_freqs = len(freqs)
factor = 4 / (num_freqs * (4 * num_rows - sqrt(8 * num_rows + 1) - 1))
factor * vis2dirty(dirty2vis(dirty, uvw, freqs), uvw, freqs) == dirty
mreineck commented 3 months ago

I don't think that the last line in your example will hold except in a handful of very, very artificial configurations. vis2dirty and dirty2vis are adjoint to each other, but that doesn't translate into them being inverses of each other up to some factor.

mreineck commented 3 months ago

I'm not really sure how the adjoint normalising factor is defined. If you can point me to some relevant literature, I'll try to provide a more useful answer.

Joshuaalbert commented 3 months ago

I'm looking to understand the units and flux-scale of the produced dirty image.

mreineck commented 3 months ago

Maybe this helps: the effect of vis2dirty and dirty2vis is equivalent (up to the small losses of accuracy due to the wgridding algorithm) to the explicit DFTs in the ducc test files: https://github.com/mreineck/ducc/blob/4619f34f2c96dd6c28be961df4d436f484d51147/python/test/test_wgridder.py#L34-L90. It's just the plain DFT, no additional factors are involved.

Joshuaalbert commented 3 months ago

Thanks for pointing to this test. It's clear that it's just computing the DFT. I'll reopen if I have anything else.