<div dir="ltr"><br><div>Hi Franz,</div><div><br></div><div>FITS dates from the era of FORTRAN and thus the first axis should go fastest, then the 2nd etc.</div><div>But it depends a bit on what the (implied) order of the axes is in the difx FITS-IDI array. You may want to take a closer look at the full header for the 'UV_DATA' table - there may be hints in there what the order of the axes is within the 'FLUX' column. The logical choice would indeed be IF * CHANNELS * POL * 2 values / complex number (or 3, in sfxc's case; we record a weight per spectral point too: (re, im, wgt)), thus IF goes first, then channel etc.</div><div><br></div><div>In sfxc those axes have been made explicit - as you can tell, so there's no ambiguity of how to interpret them.</div><div><br></div><div>Cheers,</div><div>h</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 October 2016 at 06:28, Franz Kirsten <span dir="ltr"><<a href="mailto:franz.kirsten@curtin.edu.au" target="_blank">franz.kirsten@curtin.edu.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I am currently looking at the fits-idi files as they are spit out by DiFX -- and noticed a difference in the structure of the visibility array compared to that produced by SFXC**. I'd mostly like to know how those visibilities are structured/ordered in the 'FLUX' field of the UV_DATA table.<br>
<br>
Just so you know what I look at (in python):<br>
import astropy.io.fits as fits<br>
hdulist=fits.open('./difx-file<wbr>.idifits')<br>
vis=hdulist['UV_DATA'].data['F<wbr>LUX']<br>
vis.shape<br>
> (n_times * n_baselines, some_number)<br>
<br>
Now, in my case, some_number = 4096. I have 8 IFs, 128 channels/IF and 2 polarisations. Assuming I have a pair of numbers (amp + phase, or real+imaginary?) for each visibility, 8 * 128 * 2 * 2 = 4096. But how are the data ordered? Are the, say, first 256 entries amp+phase for IF1, chan1-chan128, pol 1? In this logic the next 256 entries would be that of IF1, chan1-128, pol2. And then I'd jump to IF2 and repeat. Is this correct?<br>
<br>
Many thanks for your help!<br>
<br>
Regards,<br>
Franz<br>
<br>
**In fits-idi files that come out of SFXC:<br>
vis.shape = (n_times * n_baselines, 1, 1, n_IF, n_chan, n_pol, 3), where the three entries in the last index are amp, phase, weight.<br>
<br>
______________________________<wbr>_________________<br>
Difx-users mailing list<br>
<a href="mailto:Difx-users@listmgr.nrao.edu" target="_blank">Difx-users@listmgr.nrao.edu</a><br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/difx-users" rel="noreferrer" target="_blank">https://listmgr.nrao.edu/mailm<wbr>an/listinfo/difx-users</a><br>
</blockquote></div><br></div>