Struct birli::preprocessing::PreprocessContext
source · 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>
impl<'a> PreprocessContext<'a>
sourcepub fn as_comment(&self) -> String
pub fn as_comment(&self) -> String
A one line description of the tasks preprocessing will do.
sourcepub fn preprocess(
&self,
corr_ctx: &CorrelatorContext,
jones_array: ArrayViewMut3<'_, Jones<f32>>,
weight_array: ArrayViewMut3<'_, f32>,
flag_array: ArrayViewMut3<'_, bool>,
vis_sel: &VisSelection
) -> Result<(), BirliError>
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 visibiltiesweight_array
- Array of weights associated with Jones visibilitiesflag_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>
impl<'a> Clone for PreprocessContext<'a>
source§fn clone(&self) -> PreprocessContext<'a>
fn clone(&self) -> PreprocessContext<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for PreprocessContext<'a>
impl<'a> Debug for PreprocessContext<'a>
source§impl<'a> Default for PreprocessContext<'a>
impl<'a> Default for PreprocessContext<'a>
source§fn default() -> PreprocessContext<'a>
fn default() -> PreprocessContext<'a>
Returns the “default value” for a type. 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more