pub trait VisWritable: Sync + Send {
    fn write_vis_marlu(
        &mut self,
        vis: ArrayView3<'_, Jones<f32>>,
        weights: ArrayView3<'_, f32>,
        vis_ctx: &VisContext,
        tiles_xyz_geod: &[XyzGeodetic],
        draw_progress: bool
    ) -> Result<(), IOError>; fn write_vis_mwalib(
        &mut self,
        jones_array: ArrayView3<'_, Jones<f32>>,
        weight_array: ArrayView4<'_, f32>,
        flag_array: ArrayView4<'_, bool>,
        corr_ctx: &CorrelatorContext,
        timestep_range: &Range<usize>,
        coarse_chan_range: &Range<usize>,
        baseline_idxs: &[usize],
        avg_time: usize,
        avg_freq: usize,
        draw_progress: bool
    ) -> Result<(), IOError> { ... } }
Expand description

The container can accept a chunk of visibilities to be written.

Required methods

Write a chunk of visibilities, contextualised with a VisContext.

This makes use of the heuristic that the weights of all pols of a visibility should be equal, and thus, only three dimensions of weights / flags are used.

vis - a three dimensional array of jones matrix visibilities. The dimensions of the array are [timestep][channel][baseline]

weights - a three dimensional array of visibility weights, where the sign of the double is the flag. Assumes all weights and flags are the same for a given pol. The dimensions of the array are [timestep][channel][baseline]

vis_ctx - a VisContext which contextualises each axis of the visibilities.

draw_progress - whether or not to draw a progress bar.

Provided methods

👎 Deprecated:

use write_vis_marlu instead

Contract the weight and flag arrays along the pol axis, and write using VisWritable::write_vis_marlu

jones_array - a three dimensional array of jones matrix visibilities. The dimensions of the array are [timestep][channel][baseline]

weight_array - a four dimensional array of visibility weights. The dimensions of the array are [timestep][channel][baseline][pol]

flag_array - a four dimensional array of visibility flags. The dimensions of the array are [timestep][channel][baseline][pol]

context - a mwalib::CorrelatorContext object containing information about the timesteps, channels and baselines referred to in the jones array.

timestep_range - the range of indices into CorrelatorContext.timesteps corresponding to the first dimension of the jones array.

coarse_chan_range - the range of indices into CorrelatorContext.coarse_chans corresponding to the second dimension of the jones array. Note: this is a range of coarse channels, where the jones array is a range of fine channels

baseline_idxs - the range of indices into CorrelatorContext.metafits_context.baselines corresponding to the third dimension of the jones array.

avg_time - the number of timesteps to average together.

avg_freq - the number of channels to average together.

draw_progress - whether or not to draw a progress bar.

Errors

Can throw IOError if there is an issue writing to the file, or the indices into context are invalid.

Implementors