-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Write thorough tests that intended visibilities make their way to the peel functions. Currently, averaging to 1.28 MHz isn't happening WIP: Add UVW cutoffs WIP: Fix error handling in src/cli/error.rs This is a squashed commit of months of work by CHJ and Dev. Big props to Dev for their help.
- Loading branch information
Showing
29 changed files
with
7,404 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Benchmarks | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- "**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
MWA_BEAM_FILE: /usr/local/mwa_full_embedded_element_pattern.h5 | ||
|
||
jobs: | ||
test: | ||
name: Benchmarks | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Cargo Bench | ||
run: | | ||
cargo bench | ||
env: | ||
HYPERDRIVE_TEST_DIR: /home/runner/data | ||
|
||
- name: Zip benchmark results | ||
run: zip -r criterion.zip target/criterion/* | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: criterion.zip | ||
path: criterion.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#[derive(thiserror::Error, Debug)] | ||
pub(crate) enum PeelArgsError { | ||
#[error("No calibration output was specified. There must be at least one calibration solution file.")] | ||
NoOutput, | ||
|
||
#[error("The data either contains no frequency channels or all channels are flagged")] | ||
NoChannels, | ||
|
||
#[error("The number of iono sub passes cannot be 0")] | ||
ZeroPasses, | ||
|
||
#[error("Error when parsing iono time average factor: {0}")] | ||
ParseIonoTimeAverageFactor(crate::unit_parsing::UnitParseError), | ||
|
||
#[error("Error when parsing iono freq. average factor: {0}")] | ||
ParseIonoFreqAverageFactor(crate::unit_parsing::UnitParseError), | ||
|
||
#[error("Iono time average factor isn't an integer")] | ||
IonoTimeFactorNotInteger, | ||
|
||
#[error("Iono freq. average factor isn't an integer")] | ||
IonoFreqFactorNotInteger, | ||
|
||
#[error( | ||
"Iono time resolution isn't a multiple of input data's: {out} seconds vs {inp} seconds" | ||
)] | ||
IonoTimeResNotMultiple { out: f64, inp: f64 }, | ||
|
||
#[error("Iono freq. resolution isn't a multiple of input data's: {out} Hz vs {inp} Hz")] | ||
IonoFreqResNotMultiple { out: f64, inp: f64 }, | ||
|
||
#[error("Iono time average factor cannot be 0")] | ||
IonoTimeFactorZero, | ||
|
||
#[error("Iono freq. average factor cannot be 0")] | ||
IonoFreqFactorZero, | ||
|
||
#[error("Error when parsing minimum UVW cutoff: {0}")] | ||
ParseUvwMin(crate::unit_parsing::UnitParseError), | ||
|
||
#[error("Error when parsing maximum UVW cutoff: {0}")] | ||
ParseUvwMax(crate::unit_parsing::UnitParseError), | ||
|
||
#[error(transparent)] | ||
Glob(#[from] crate::io::GlobError), | ||
|
||
#[error(transparent)] | ||
VisRead(#[from] crate::io::read::VisReadError), | ||
|
||
#[error(transparent)] | ||
FileWrite(#[from] crate::io::write::FileWriteError), | ||
|
||
#[error("Error when trying to read source list: {0}")] | ||
SourceList(#[from] crate::srclist::ReadSourceListError), | ||
|
||
#[error(transparent)] | ||
Beam(#[from] crate::beam::BeamError), | ||
|
||
#[error(transparent)] | ||
Model(#[from] crate::model::ModelError), | ||
|
||
#[error(transparent)] | ||
IO(#[from] std::io::Error), | ||
|
||
#[cfg(any(feature = "cuda", feature = "hip"))] | ||
#[error(transparent)] | ||
Gpu(#[from] crate::gpu::GpuError), | ||
} |
Oops, something went wrong.