Skip to content

Commit

Permalink
Use Birli 0.5.1 for PFB correction.
Browse files Browse the repository at this point in the history
This commit adds two new PFB flavours (including the "Jake Jones"
flavour which should be the best) and replaces the PFB correction code
with Birli's correction code.
  • Loading branch information
cjordan committed Mar 9, 2022
1 parent be0a804 commit 89d7879
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 114 deletions.
65 changes: 32 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cuda-static = ["mwa_hyperdrive_common/cuda-static"]
all-static = ["erfa-static", "hdf5-static", "cfitsio-static", "cuda-static"]

[dependencies]
birli = { version = "0.5.0", default_features = false }
birli = { version = "0.5.1", default_features = false }
console = "0.15.0"
crossbeam-channel = "0.5.0"
crossbeam-utils = "0.8.7"
Expand Down
2 changes: 2 additions & 0 deletions src/calibrate/params/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ impl CalibrateParams {
info!("Using {} gpubox files", gpuboxes.len());
match pfb_flavour {
PfbFlavour::None => info!("Not doing any PFB correction"),
PfbFlavour::Jake => info!("Using 'Jake Jones' PFB gains"),
PfbFlavour::Cotter2014 => info!("Using 'Cotter 2014' PFB gains"),
PfbFlavour::Empirical => info!("Using 'RTS empirical' PFB gains"),
PfbFlavour::Levine => info!("Using 'Alan Levine' PFB gains"),
}
Expand Down
7 changes: 7 additions & 0 deletions src/data_formats/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ pub enum ReadInputDataError {
#[error("The supplied mwaf files don't have flags for timestep {timestep} (GPS time {gps})")]
MwafFlagsMissingForTimestep { timestep: usize, gps: f64 },

#[error("The specified PFB gains ('{pfb_flavour}') cannot be applied by Birli,\nprobably because this observation's frequency is incompatible ({freq_res_hz} Hz):\n{birli_error}")]
PfbRefuse {
pfb_flavour: String,
freq_res_hz: f64,
birli_error: BirliError,
},

#[error("Output {array_type} array did not have expected {expected_len} elements on axis {axis_num}")]
BadArraySize {
array_type: &'static str,
Expand Down
3 changes: 3 additions & 0 deletions src/data_formats/raw/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ pub enum RawReadError {
#[error("The raw MWA data contains no timesteps")]
NoTimesteps,

#[error("Attempted to read in MWA VCS data; this is unsupported")]
Vcs,

#[error("{0}")]
MwafMerge(#[from] MwafMergeError),

Expand Down
Loading

0 comments on commit 89d7879

Please sign in to comment.