Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to correctly read in visibility data from a FITS file using IDL

  1. Jun 11, 2012 #1
    I'm having some trouble reading in some data from a FITS file. The FITS file has visibility data for 256 different frequency channels but I only seem to be able to read in the data for the first frequency channel. My question is how do I change which frequency channel I want to look at, for example look at the 100th freq channel rather than the first?

    The code I have written in IDL to open the file and extract information so far is:

    infile = 'finaluv.fits'

    data = mrdfits(infile,0,hdr)

    params = data.params
    array = data.array

    u = params[0,*]
    v = params[1,*]
    baseline = params[5,*]

    real = reform(array[0,0,100,*])
    imag = reform(array[0,0,100,*])

    visibility = sqrt(real^2+imag^2)
    uvdistance = sqrt(u^2 +v^2)
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted