Skip to content

How_do_I_convert_an_image_from_a_FITS_file_into_UV_data?

Gijs Molenaar edited this page Feb 13, 2014 · 2 revisions

Here's a way to do it in aips++:

> Hi Tim
>
> There must be some way to do this in aips++, but I haven't spotted it ...
>
> I can see how to read in an image from a FITS file and FFT the image
> to the UV domain.
>
> I then want to degrid the image from the FFT grid on to the UV tracks
> defined in an MS. I haven't been able to spot an appropriate
> method in the imager or image tools to do this.

imager.ft or newsimulator.predict will do this. The degridded visibilities will be put in the MODEL_DATA column.

Cheers,

Tim

Here's a way to do it in MeqTrees:

In MeqTrees we read in the image via a FITSImage node. We then FFT it with a FFTBrick node. Finally we interpolate to visibilities with a UVInterpolWave or UVInterpol node. NOTE: MeqTrees is very finickly about what constitutes a valid FITS file - we need the four axes defined with (usually) CTYPE4 == FREQ, CTYPE3 Stokes or Time, CTYPE2 L, or Dec, and CTYPE1 RA or M, where for example we might have:

AXIS   =                    4 / number of array dimensions
NAXIS1  =                  101
NAXIS2  =                  101
NAXIS3  =                    1
NAXIS4  =                    4

Here we have four frequency images, each of size 101 x 101.

Clone this wiki locally