Visibility Header¶
-
class
oskar.
VisHeader
¶ This class provides a Python interface to an OSKAR visibility header.
The
oskar.VisHeader
class encapsulates the small amount of metadata used to describe a visibility data set generated by OSKAR, and it will be saved as part of any visibility data files written by theoskar.Interferometer
class.To load the header data from an OSKAR visibility binary file (note this is not a CASA Measurement Set, although it can be converted into one), use the
read()
class method. This will return a tuple containing both the header data and also a handle to the binary file, which can be used to read subsequentoskar.VisBlock
data structures from the same file.The visibility data header for the current simulation can be returned using the method
oskar.Interferometer.vis_header()
if required.Examples
To load the header from a file
example.vis
and print some values from it:>>> (header, handle) = oskar.VisHeader.read('example.vis') >>> print(header.num_blocks) 3 >>> print(header.num_times_total) 24 >>> print(header.num_channels_total) 3 >>> print(header.freq_start_hz) 100000000.0 >>> print(header.freq_inc_hz) 20000000.0 >>> print(header.phase_centre_ra_deg) 20.0 >>> print(header.phase_centre_dec_deg) -29.999999999999996
-
amp_type
¶ Returns the OSKAR data type of the visibility amplitude array.
-
channel_bandwidth_hz
¶ Returns the width of each frequency channel, in Hz.
-
coord_precision
¶ Returns the OSKAR data type of the baseline coordinate arrays.
-
freq_inc_hz
¶ Returns the frequency channel increment, in Hz.
-
freq_start_hz
¶ Returns the frequency of the first channel, in Hz.
-
max_channels_per_block
¶ Returns the maximum number of channels per visibility block.
-
max_times_per_block
¶ Returns the maximum number of time samples per visibility block.
-
num_blocks
¶ Returns the expected number of visibility blocks for a run.
-
num_channels_total
¶ Returns the total number of frequency channels.
-
num_stations
¶ Returns the number of stations.
Returns the number of binary data tags per visibility block.
-
num_times_total
¶ Returns the total number of time samples.
-
phase_centre_ra_deg
¶ Returns the phase centre Right Ascension, in degrees.
-
phase_centre_dec_deg
¶ Returns the phase centre Declination, in degrees.
-
time_start_mjd_utc
¶ Returns the start time, as MJD(UTC).
-
time_inc_sec
¶ Returns the time increment, in seconds.
-
time_average_sec
¶ Returns the time averaging period, in seconds.
-
classmethod
read
(binary_file)¶ Reads a visibility header from an OSKAR binary file and returns it.
Parameters: binary_file (str or oskar.Binary) – Path or handle to an OSKAR binary file. Returns: A two-element tuple containing the visibility header and a handle to the OSKAR binary file, opened for reading. Return type: tuple
-