Data Accessor Variants

Basic data accessors

class tkp.accessors.dataaccessor.DataAccessor[source]

Base class for accessors used with tkp.sourcefinder.image.ImageData.

Data accessors provide a uniform way for the ImageData class (ie, generic image representation) to access the various ways in which images may be stored (FITS files, arrays in memory, potentially HDF5, etc).

This class cannot be instantiated directly, but should be subclassed and the abstract properties provided. Note that all abstract properties are required to provide a valid accessor.

Additional properties may also be provided by subclasses. However, TraP components are required to degrade gracefully in the absence of this optional properties.


Restoring beam. Tuple of three floats – semi-major axis (in pixels), semi-minor axis (pixels) and position angle (radians).


Declination at the central pixel of the image. J2000 decimal degrees.


Right ascension at the central pixel of the image. J2000 decimal degrees.


Two dimensional numpy.ndarray of floating point pixel values. TODO: Definitive statement on orientation/transposing.


Massage the class attributes into a flat dictionary with database-friendly values.

While rather tedious, this is easy to serialize and store separately to the actual image data.

May be extended by subclasses to return additional data.


The frequency bandwidth of this image in Hz.


Effective frequency of the image in Hz. That is, the mean frequency of all the visibility data which comprises this image.


(x, y) tuple representing the size of a pixel along each axis in units of degrees.


RMS for quality-control.

Root mean square value calculated from central region of this image. We sigma-clip the input-data in an attempt to exclude source-pixels and keep only background-pixels.


Total time on sky in seconds.


Timestamp of the first integration which constitutes part of this image. MJD in seconds.


A (string) URL representing the location of the image at time of processing.


An instance of tkp.coordinates.WCS.

The following acessors are derived from the basic DataAccessor class:

class tkp.accessors.fitsimage.FitsImage

Generic FITS data access.

class tkp.accessors.casaimage.CasaImage

Generic CASA image access.

class tkp.accessors.kat7casaimage.Kat7CasaImage

KAT-7 specific CASA image access.

LOFAR-specific data accessors

class tkp.accessors.lofaraccessor.LofarAccessor[source]

Antenna set in use during observation. String; ‘LBA_INNER’, ‘LBA_OUTER’, ‘LBA_SPARSE’, ‘LBA’ or ‘HBA’


Number of core stations in use during observation. Integer.


Number of international stations in use during observation. Integer.


Number of remote stations in use during observation. Integer.


Number of subbands.


Width of a subband in Hz.

The following accessors are derived from the generic LofarAccessor:

class tkp.accessors.lofarfitsimage.LofarFitsImage

LOFAR FITS access.

class tkp.accessors.lofarcasaimage.LofarCasaImage

LOFAR CASA image access.