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
//! Smooth radio astronomy FITS images and cubes to a common resolution by
//! convolution in the UV plane. A Rust port of `beamcon_2D` and `beamcon_3D`
//! from [RACS-tools](https://github.com/AlecThomson/RACS-tools), also
//! available as a [Python package](https://pypi.org/project/convolve-rs/) and
//! the `convolvers` CLI.
//!
//! - [`Beam`]: an elliptical Gaussian beam and its algebra ([`beam`]).
//! - [`common_beam`](fn@common_beam): the smallest beam a set of beams can be
//! convolved to.
//! - [`convolve_uv`](fn@convolve_uv): UV-plane convolution between two beams.
//! - [`smooth`](fn@smooth): convolution plus Jy/beam or Kelvin flux scaling.
//! - [`fits_io`], [`cube_io`]: FITS image and cube I/O.
//!
//! ```
//! use convolve_rs::{Beam, BrightnessUnit, smooth};
//! use ndarray::Array2;
//!
//! let old_beam = Beam::from_arcsec(10.0, 10.0, 0.0)?;
//! let new_beam = Beam::from_arcsec(20.0, 20.0, 0.0)?;
//! let image = Array2::<f32>::from_elem((64, 64), 1.0);
//! let pixel_deg = 2.5 / 3600.0;
//!
//! let smoothed = smooth(
//! &image,
//! &old_beam,
//! &new_beam,
//! pixel_deg,
//! pixel_deg,
//! BrightnessUnit::JyPerBeam,
//! None,
//! )?;
//! assert_eq!(smoothed.dim(), image.dim());
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use _convolve_rs;