Crate mwalib[][src]

Definitions for what we expose to the library Public items will be exposed as mwalib::module.

Re-exports

pub use fitsio;
pub use fitsio_sys;

Modules

error

Errors associated with reading in fits files.

Macros

fits_open

Open a fits file.

fits_open_hdu

Open a fits file’s HDU.

get_fits_col

Get a column from a fits file’s HDU.

get_fits_image

Given a FITS file pointer and a HDU, read the associated image.

get_hdu_image_size

Get the size of the image on the supplied FITS file pointer and HDU.

get_optional_fits_key

Given a FITS file pointer, a HDU that belongs to it, and a keyword that may or may not exist, pull out the value of the keyword, parsing it into the desired type.

get_optional_fits_key_long_string

Given a FITS file pointer, and a keyword to a long string keyword that may or may not exist, pull out the long string of the keyword. This deals with FITSs CONTINUE mechanism by calling a low level fits function.

get_required_fits_key

Given a FITS file pointer, a HDU that belongs to it, and a keyword, pull out the value of the keyword, parsing it into the desired type.

get_required_fits_key_long_string

Given a FITS file pointer, and a keyword to a long string keyword, pull out the long string of the keyword. This deals with FITSs CONTINUE mechanism by calling a low level fits function.

Structs

Antenna
Baseline

This is a struct for our baselines, so callers know the antenna ordering

CoarseChannel

This is a struct for our coarse channels

CorrelatorContext

mwalib correlator observation context. This represents the basic metadata for a correlator observation.

MetafitsContext

mwalib metafits context. This represents the basic metadata for the observation.

RFInput
TimeStep

This is a struct for our timesteps NOTE: correlator timesteps use unix time, voltage timesteps use gpstime, but we convert the two depending on what we are given

VisibilityPol

This is a struct for our visibility polarisations

VoltageContext

mwalib voltage captue system (VCS) observation context. This represents the basic metadata for a voltage capture observation.

Enums

CorrelatorVersion

Enum for all of the known variants of file format based on Correlator version

FitsError
MwalibError
Pol

Instrument polarisation.

Constants

COAX_V_FACTOR

the velocity factor of electic fields in RG-6 like coax cable

MWA_ALTITUDE_METRES

The MWA’s altitude in metres.

MWA_LATITUDE_RADIANS

The MWA’s latitude on Earth in radians. This is -26d42m11.94986s.

MWA_LONGITUDE_RADIANS

The MWA’s longitude on Earth in radians. This is 116d40m14.93485s.

Functions

as_u8_slice
convert_gpstime_to_unixtime

Returns a UNIX time given a GPStime

convert_unixtime_to_gpstime

Returns a UNIX time given a GPStime

dms_to_degrees

Function to take d m s and return the decimal degrees.

get_antennas_from_baseline

Given a baseline index, return a tuple of (ant1,ant2) for a std right upper triangle e.g. (where N is num antennas) Returns None if baseline was not found (your baseline is out of range) 0,0 0,1 … 0,N-1 1,1 1,2 1,N-1 … 2,2 … N-1,N-1

get_baseline_count

Given the number of antennas, calculate the number of baselines (cross+autos)

get_baseline_from_antenna_names

Given two antenna names and the vector of Antenna structs from metafits, return the baseline index.

get_baseline_from_antennas

Given two antenna indicies, return the baseline index.