1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#![deny(clippy::all)]
#![warn(clippy::missing_safety_doc)]
#![warn(clippy::float_cmp)]
#![warn(clippy::if_not_else)]
#![warn(clippy::explicit_iter_loop)]
#![warn(clippy::wildcard_imports)]
#![warn(clippy::cloned_instead_of_copied)]
#![warn(clippy::cognitive_complexity)]
#![warn(clippy::type_repetition_in_bounds)]
#![warn(clippy::redundant_closure_for_method_calls)]
#![warn(clippy::doc_markdown)]
#![warn(clippy::match_same_arms)]
#![warn(clippy::default_trait_access)]
#![warn(clippy::semicolon_if_nothing_returned)]
#![warn(clippy::explicit_into_iter_loop)]
#![warn(clippy::inefficient_to_string)]
#![warn(clippy::needless_pass_by_value)]
#![warn(clippy::used_underscore_binding)]
#[allow(non_camel_case_types)]
pub type c32 = num_complex::Complex<f32>;
#[allow(non_camel_case_types)]
pub type c64 = num_complex::Complex<f64>;
pub mod averaging;
pub mod constants;
pub mod context;
pub mod jones;
pub mod math;
pub mod pos;
pub mod selection;
pub mod sexagesimal;
#[cfg(feature = "io")]
pub mod io;
#[cfg(feature = "cuda")]
pub mod cuda;
pub use context::{MwaObsContext, ObsContext, VisContext};
pub use jones::Jones;
pub use pos::{
azel::AzEl,
earth::{Ellipsoid, LatLngHeight},
enh::ENH,
hadec::HADec,
lmn::LMN,
pal, precession,
radec::RADec,
uvw::UVW,
xyz::{XyzGeocentric, XyzGeodetic},
};
pub use selection::{SelectionError, VisSelection};
pub use erfa_sys;
pub use hifitime;
pub use ndarray;
pub use num_complex;
pub use num_complex::Complex;
pub use num_traits;
pub use rayon;
cfg_if::cfg_if! {
if #[cfg(feature = "mwalib")] {
pub use mwalib;
pub use mwalib::{fitsio, fitsio_sys};
}
}
cfg_if::cfg_if! {
if #[cfg(feature = "io")] {
pub use rubbl_casatables;
pub use io::{MeasurementSetWriter, UvfitsWriter, VisWritable, UvfitsWriteError};
}
}
#[cfg(feature = "cuda")]
pub use cuda_runtime_sys;
#[cfg(test)]
#[test]
fn hifitime_works_as_expected() {
use hifitime::Epoch;
let gps = 1065880128.0;
let epoch = Epoch::from_gpst_seconds(gps);
approx::assert_abs_diff_eq!(epoch.as_gpst_seconds(), gps);
let jd_utc = 2444244.5;
let epoch = Epoch::from_jde_utc(jd_utc);
approx::assert_abs_diff_eq!(epoch.as_jde_utc_days(), jd_utc);
approx::assert_abs_diff_eq!(epoch.as_gpst_seconds(), 0.0);
}