Skip to content

Commit

Permalink
Fixed calculation of number of baselines for cases where num_antennas…
Browse files Browse the repository at this point in the history
… is odd
  • Loading branch information
gsleap committed Apr 13, 2022
1 parent 7f13770 commit 4922d82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Changes in each release are listed below.

## 0.13.1 13-Apr-2022 (Pre-release)
* Fixed calculation of number of baselines for cases where num_antennas is odd.

## 0.13.0 04-Feb-2022 (Pre-release)
* rfinput->digital_gains are now f64 and are divided by 64 (the value in the metafits is 64x larger to allow more flexible gains settings)
* Modernised examples using clap 3.0 and reduced dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/metafits_context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ impl MetafitsContext {

// `num_baselines` is the number of cross-correlations + the number of
// auto-correlations.
let num_baselines = (num_antennas / 2) * (num_antennas + 1);
let num_baselines = (num_antennas * (num_antennas + 1)) / 2;

// The FREQCENT value in the metafits is in units of kHz - make it Hz.
let centre_freq_hz: u32 = {
Expand Down

0 comments on commit 4922d82

Please sign in to comment.