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().
Sort a data dictionary by the specified order. If no order is supplied, the data dictionary is sorted by baseline using baselineOrder().
Prune baselines from a data dictionary that are less than uvMin or greater than or equal to uvMax.
Note
uvMin and uvMax should be specified in lambda
Given an AntennaArray instance and a data dictionary, re-phase the data to change the pointing center.
Read in and work with FITS IDI and UVFITS files. Returns either a CorrelateDataIDI or CorrelatedDataUV instance.
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.
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
of observations
pols - Numpy array of polarization product codes
freq - Numpy array of frequency channels in Hz
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.
Return an AIPY AntennaArray instance for the array that made the observations contained here.
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. Optionally, baselines with lengths between uvMin and uvMax can only be returned.
Note
uvMin and uvMax should be specified in lambda
Changed in version 1.1.0: ‘set’ can now be either an integer or a list to pull back multiple integrations.
Return a ephem.Observer instances for the array described in the file.
Class to make accessing information about a UVFITS file 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.
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
of observations
pols - Numpy array of polarization product codes
freq - Numpy array of frequency channels in Hz
array
dateObs - Datetime object for the reference date of the FIT IDI file
antennas - List of lsl.common.stations.Antenna instances
Note
The CorrelatedDataUV.antennas attribute should be used over CorrelatedDataUV.station.getAntennas() since the mapping in the UVFITS file may not be the same as the digitizer order.
Return an AIPY AntennaArray instance for the array that made the observations contained here.
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. Optionally, baselines with lengths between uvMin and uvMax can only be returned.
Note
uvMin and uvMax should be specified in lambda
Changed in version 1.1.0: ‘set’ can now be either an integer or a list to pull back multiple integrations.
Return a ephem.Observer instances for the array described in the file.
Class to make accessing information about a MS 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.
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
of observations
pols - Numpy array of polarization product codes
freq - Numpy array of frequency channels in Hz
array
dateObs - Datetime object for the reference date of the FIT IDI file
antennas - List of lsl.common.stations.Antenna instances
Note
The CorrelatedDataMS.antennas attribute should be used over CorrelatedDataMS.station.getAntennas() since the mapping in the MS may not be the same as the digitizer order.
Return an AIPY AntennaArray instance for the array that made the observations contained here.
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. Optionally, baselines with lengths between uvMin and uvMax can only be returned.
Note
uvMin and uvMax should be specified in lambda
Changed in version 1.1.0: ‘set’ can now be either an integer or a list to pull back multiple integrations.
Return a ephem.Observer instances for the array described in the file.
Sub-class of the aipy.img.ImgW class that adds support for different visibility weighting scheme and uv plane tapering. This class also adds in a couple of additional methods that help determine the size of the field of view and the pixels near the phase center.
Return the inverse FFT of the sample weightings (for all mf_order terms, or the specified term if supplied), with the 0,0 point moved to ‘center’. In the images return north is up and east is to the left.
There are a few keywords that control how the image is formed. There are:
- weighting - The weighting scheme (‘natural’, ‘uniform’, or
‘briggs’) used on the data;
- localFraction - The fraction of the uv grid that is consider
“local” for the ‘uniform’ and ‘briggs’ methods;
- robust - The value for the weighting robustness under the
‘briggs’ method; and
taper - The size of u and v Gaussian tapers at the 30% level.
Return the approximate size of the field of view in radians. The field of view calculate is based off the maximum and minimum values of L found for the inverted uv matrix.
Return the approximate size of pixels at the phase center in radians. The pixel size is averaged over the four pixels that neighboor the phase center.
Return the inverse FFT of the UV matrix, with the 0,0 point moved to ‘center’. In the images return north is up and east is to the left.
There are a few keywords that control how the image is formed. There are:
- weighting - The weighting scheme (‘natural’, ‘uniform’, or
‘briggs’) used on the data;
- localFraction - The fraction of the uv grid that is consider
“local” for the ‘uniform’ and ‘briggs’ methods;
- robust - The value for the weighting robustness under the
‘briggs’ method; and
taper - The size of u and v Gaussian tapers at the 30% level.
Same as Img.put, only now the w component is projected to the w=0 plane before applying the data to the UV matrix.
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.
Given a blank matplotlib axes instance and a gridded image generated by the buildGriddedImage() function, plot the image on the axes and setup the basic coordinate system. This function returns the matplotlib object added to the plot
Changed in version 1.2.1: Changed the function to return the matplotlib object plotted so that colorbars can be added
Changed in version 1.1.0: Added a ‘shifted’ keyword to control whether or not the image is centered or not.
New in version 1.0.1.
Given a gridded image generated by the buildGriddedImage() function and an AntennaArray instance, return a two-element tuple containing the RA and dec. values (in radians) for each pixel in the image.
The ‘phaseCenter’ keyword controls what the phase center of the image is and defaults to zenith.
Given a gridded image generated by the buildGriddedImage() function and an AntennaArray instance, return a two-element tuple containing the azimuth and elevation (altitude), both in radians, for each pixel in the image.
The ‘phaseCenter’ keyword controls what the phase center of the image is and defaults to zenith.
Function to apply a phase-only (and, optionally, a amplitude) self- calibration to data stored in a readUVData dictionary and a model sky stored in a lsl.sim.vis.buildSimSky dictionary for the given polarization and channel(s).
Note
If the “amplitude” keyword is set to True, a three-element tuple of self-cal’d data, gain coefficients, and phase offsets is returned rather than the standard two-element tuple.
Function to apply a delay-only (and, optionally, a amplitude) self- calibration to data stored in a readUVData dictionary and a model sky stored in a lsl.sim.vis.buildSimSky dictionary for the given polarization and channel(s).
Note
If the “amplitude” keyword is set to True, a three-element tuple of self-cal’d data, gain coefficients, and delays in ns is returned rather than the standard two-element tuple.
Function to apply a delay and phase offset (and, optionally, a amplitude) self-calibration to data stored in a readUVData dictionary and a model sky stored in a lsl.sim.vis.buildSimSky dictionary for the given polarization and channel(s).
Note
If the “amplitude” keyword is set to True, a four-element tuple of self-cal’d data, gain coefficients, delays in ns, and phase offsets is returned rather than the standard three-element tuple.
Given a AIPY antenna array instance, a data dictionary, 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:
- Find the peak flux in the residual image
- Compute the systems response to a point source at that location
- Remove the scaled porition of this beam from the residuals
- Go to 1.
Given a AIPY antenna array instance, a data dictionary, an AIPY ImgW instance filled with data, and a dictionary of sources, return the CLEAN components and the residuals map. This function uses a CLEAN-like method that computes the array beam for each peak in the flux. Thus the CLEAN loop becomes:
- Find the peak flux in the residual image
- Compute the systems response to a point source at that location
- Remove the scaled porition of this beam from the residuals
- Go to 1.
This function differs from clean() in that it only cleans localized regions around each source rather than the whole image. This is intended to help the mem() function along.
Given a AIPY antenna array instance, a data dictionary, and an AIPY ImgW instance filled with data, return a deconvolved image. This function implements a least squares deconvolution.
gain - least squares loop gain (default 0.05)
maxIter - Maximum number of iteration (default 150)
(default 1e-9)