Struct mwalib::voltage_context::VoltageContext[][src]

pub struct VoltageContext {
    pub metafits_context: MetafitsContext,
    pub corr_version: CorrelatorVersion,
    pub start_gps_time_ms: u64,
    pub end_gps_time_ms: u64,
    pub start_unix_time_ms: u64,
    pub end_unix_time_ms: u64,
    pub duration_ms: u64,
    pub num_timesteps: usize,
    pub timestep_duration_ms: u64,
    pub num_samples_per_timestep: usize,
    pub timesteps: Vec<TimeStep>,
    pub num_coarse_chans: usize,
    pub coarse_chans: Vec<CoarseChannel>,
    pub bandwidth_hz: u32,
    pub coarse_chan_width_hz: u32,
    pub fine_chan_width_hz: u32,
    pub num_fine_chans_per_coarse: usize,
    // some fields omitted
}

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

Fields

metafits_context: MetafitsContext

Observation Metadata

corr_version: CorrelatorVersion

Version of the correlator format

start_gps_time_ms: u64

The proper start of the observation (the time that is common to all provided voltage files).

end_gps_time_ms: u64

end_gps_time_ms is the actual end time of the observation
i.e. start time of last common timestep plus length of a voltage file (1 sec for MWA Legacy, 8 secs for MWAX).

start_unix_time_ms: u64

start_gps_time_ms but in UNIX time (milliseconds)

end_unix_time_ms: u64

end_gps_time_ms but in UNIX time (milliseconds)

duration_ms: u64

Total duration of observation (based on voltage files)

num_timesteps: usize

Number of timesteps in the observation

timestep_duration_ms: u64

length in millseconds of each timestep

num_samples_per_timestep: usize

Number of samples in each timestep

timesteps: Vec<TimeStep>

This is an array of all timesteps we have data for

num_coarse_chans: usize

Number of coarse channels after we’ve validated the input voltage files

coarse_chans: Vec<CoarseChannel>

Vector of coarse channel structs

bandwidth_hz: u32

Total bandwidth of observation (of the coarse channels we have)

coarse_chan_width_hz: u32

Bandwidth of each coarse channel

fine_chan_width_hz: u32

Volatge fine_chan_resolution (if applicable- MWA legacy is 10 kHz, MWAX is unchannelised i.e. the full coarse channel width)

num_fine_chans_per_coarse: usize

Number of fine channels in each coarse channel

Implementations

impl VoltageContext[src]

pub fn new<T: AsRef<Path>>(
    metafits_filename: &T,
    voltage_filenames: &[T]
) -> Result<Self, MwalibError>
[src]

From a path to a metafits file and paths to voltage files, create an VoltageContext.

The traits on the input parameters allow flexibility to input types.

Arguments

  • metafits - filename of metafits file as a path or string.

  • voltages - slice of filenames of voltage files as paths or strings.

Returns

  • Result containing a populated VoltageContext object if Ok.

Trait Implementations

impl Debug for VoltageContext[src]

impl Display for VoltageContext[src]

Implements fmt::Display for VoltageContext struct

Arguments

  • f - A fmt::Formatter

Returns

  • fmt::Result - Result of this method

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.