pub struct PreprocessContext<'a> {
    pub array_pos: LatLngHeight,
    pub phase_centre: RADec,
    pub correct_cable_lengths: bool,
    pub correct_digital_gains: bool,
    pub passband_gains: Option<&'a [f64]>,
    pub calsols: Option<Array2<Jones<f64>>>,
    pub correct_geometry: bool,
    pub aoflagger_strategy: Option<String>,
    pub draw_progress: bool,
}
Expand description

Options for preprocessing a chunk of correlator data

Fields§

§array_pos: LatLngHeight

The array position used for geometric corrections

§phase_centre: RADec

The phase centre used for geometric corrections

§correct_cable_lengths: bool

Whether cable length corrections are enabled

§correct_digital_gains: bool

Whether digital gain corrections are enabled

§passband_gains: Option<&'a [f64]>

the pfb passband gains to use for corrections

§calsols: Option<Array2<Jones<f64>>>

The calibration solutions to apply

§correct_geometry: bool

Whether geometric corrections are enabled

§aoflagger_strategy: Option<String>

AOFlagger strategy path for flagging

§draw_progress: bool

Whether to draw progress bars

Implementations§

source§

impl<'a> PreprocessContext<'a>

source

pub fn as_comment(&self) -> String

A one line description of the tasks preprocessing will do.

source

pub fn preprocess( &self, corr_ctx: &CorrelatorContext, jones_array: ArrayViewMut3<'_, Jones<f32>>, weight_array: ArrayViewMut3<'_, f32>, flag_array: ArrayViewMut3<'_, bool>, vis_sel: &VisSelection ) -> Result<(), BirliError>

Preprocess visibilities for a chunk of correlator data

Arguments
  • corr_ctx - marlu::mwalib::CorrelatorContext
  • jones_array - Array of Jones visibilties
  • weight_array - Array of weights associated with Jones visibilities
  • flag_array - Array of flags associated with Jones visibilities
Errors

will wrap errors from correct_digital_gains, correct_coarse_passband_gains

TODO: more granular error types: PreprocessingError -> {DigitalGainsError, etc.}

Trait Implementations§

source§

impl<'a> Clone for PreprocessContext<'a>

source§

fn clone(&self) -> PreprocessContext<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for PreprocessContext<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for PreprocessContext<'a>

source§

fn default() -> PreprocessContext<'a>

Returns the “default value” for a type. Read more
source§

impl Display for PreprocessContext<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for PreprocessContext<'a>

§

impl<'a> Send for PreprocessContext<'a>

§

impl<'a> Sync for PreprocessContext<'a>

§

impl<'a> Unpin for PreprocessContext<'a>

§

impl<'a> UnwindSafe for PreprocessContext<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.