Imaging

Imaging

Module to support imaging correlated data. This module provides utilities to read FITS IDI files into data dictionaries (as described in lsl.sim.vis) and build AIPY ImgW instances from the data dictionaries. Also included is a utility to sort data dictionaries by baselines.

New in version 0.5.0.

lsl.imaging.utils.baselineOrder(bls)

Like numpy.argsort(), but for a list of two-element tuples of baseline pairs. The resulting lists can then be used to sort a data dictionary a la sortDataDict().

lsl.imaging.utils.sortDataDict(dataDict, order=None)

Sort a data dictionary by the specified order. If no order is supplied, the data dictionary is sorted by baseline using baselineOrder().

class lsl.imaging.utils.CorrelatedData(filename)

Class to make accessing information about a FITS IDI easy. This wraps all of the “messy” machinery needed to extract both the metadata and data from the file and return them as common LSL objects.

This class has three main attributes to interact with:
  • getAntennaArray - Return a lsl.sim.vim.AntennaArray instance that represents the array where the data was obtained. This is useful for simulation proposes and computing source positions.
  • getObserver - Return a ephem.Observer instance representing the array
  • getDataSet - Return a data dictionary of all baselines for a given set of observations
The class also includes a variety of useful metadata attributes:
  • pols - Numpy array of polarization product codes
  • freq - Numpy array of frequency channels in Hz
  • station - LSL lsl.common.stations.LWAStation instance for the array
  • dateObs - Datetime object for the reference date of the FIT IDI file
  • antennas - List of lsl.common.stations.Antenna instances

Note

The CorrelatedData.antennas attribute should be used over CorrelatedData.station.getAntennas() since the mapping in the FITS IDI file may not be the same as the digitizer order.

getAntennaArray()

Return an AIPY AntennaArray instance for the array that made the observations contained here.

getDataSet(set, includeAuto=False, sort=True)

Return a baseline sorted data dictionary for the specified data set. By default this excludes the autocorrelations. To include autocorrelations set the value of ‘includeAuto’ to True. Setting the ‘sort’ keyword to False will disable the baseline sorting.

getObserver()

Return a ephem.Observer instances for the array described in the file.

lsl.imaging.utils.buildGriddedImage(dataDict, MapSize=80, MapRes=0.5, MapWRes=0.1, pol='xx', chan=None)

Given a data dictionary, build an aipy.img.ImgW object of gridded uv data which can be used for imaging. The ImgW object itself is returned by this function to make it more versatile.

Deconvolution

Deconvolution support for images made with lsl.imaging.utils.buildGriddedImage().

lsl.imaging.deconv.estimateBeam(aa, HA, dec, MapSize=80, MapRes=0.5, MapWRes=0.1, freq=49000000.0)

Compute the beam shape for a specified pointing and array configuration. To get the scale of the beam and the gridding correct, the MapSize, MapRes, and MapWRes for the image all need to be specified.

Returns a numpy array of the beam response.

lsl.imaging.deconv.deconvolve(aa, aipyImg, MapSize=80, MapRes=0.5, MapWRes=0.1, lat=34.07, freq=49000000.0, gain=0.1, maxIter=150, verbose=True)

Given a AIPY antenna array instance and an AIPY ImgW instance filled with data, return a deconvolved image. This function uses a CLEAN-like method that computes the array beam for each peak in the flux. Thus the CLEAN loop becomes:

  1. Find the peak flux in the residual image
  2. Compute the systems response to a point source at that location
  3. Remove the scaled porition of this beam from the residuals
  4. Go to 1.
CLEAN tuning parameters:
  • gain - CLEAN loop gain (default 0.1)
  • maxIter - Maximum number of iteration (default 150)

Table Of Contents

Previous topic

Correlation

Next topic

Post-Acquisition Beam Forming

This Page