Skip to content

Commit 295cead

Browse files
authored
Merge pull request #275 from PyAutoLabs/feature/cli-noise-clean
fix: suppress CLI noise from escape sequences and third-party warnings
2 parents c11846a + da7d940 commit 295cead

9 files changed

Lines changed: 15 additions & 11 deletions

File tree

autoarray/inversion/inversion/imaging/inversion_imaging_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def data_vector_via_psf_weighted_data_from(
7474
vals: np.ndarray, # (nnz,) float64 mapping weights incl sub_fraction
7575
S: int, # number of source pixels
7676
) -> np.ndarray:
77-
"""
77+
r"""
7878
Returns the data vector `D` from the `psf_weighted_data` matrix (see `psf_weighted_data_from`), which encodes the
7979
the 1D image `d` and 1D noise-map values `\sigma` (see Warren & Dye 2003).
8080
@@ -107,7 +107,7 @@ def data_vector_via_psf_weighted_data_from(
107107
def data_vector_via_blurred_mapping_matrix_from(
108108
blurred_mapping_matrix: np.ndarray, image: np.ndarray, noise_map: np.ndarray
109109
) -> np.ndarray:
110-
"""
110+
r"""
111111
Returns the data vector `D` from a blurred mapping matrix `f` and the 1D image `d` and 1D noise-map $\sigma$`
112112
(see Warren & Dye 2003).
113113

autoarray/inversion/inversion/imaging_numba/inversion_imaging_numba_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def psf_precision_value_from(
344344
def data_vector_via_blurred_mapping_matrix_from(
345345
blurred_mapping_matrix: np.ndarray, image: np.ndarray, noise_map: np.ndarray
346346
) -> np.ndarray:
347-
"""
347+
r"""
348348
Returns the data vector `D` from a blurred mapping matrix `f` and the 1D image `d` and 1D noise-map $\sigma$`
349349
(see Warren & Dye 2003).
350350
@@ -381,7 +381,7 @@ def data_vector_via_psf_weighted_data_from(
381381
pix_lengths: np.ndarray,
382382
pix_pixels: int,
383383
) -> np.ndarray:
384-
"""
384+
r"""
385385
Returns the data vector `D` from the `psf_weighted_data` matrix (see `psf_weighted_data_from`), which encodes the
386386
the 1D image `d` and 1D noise-map values `\sigma` (see Warren & Dye 2003).
387387

autoarray/inversion/inversion/inversion_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def curvature_matrix_via_mapping_matrix_from(
8484
settings: "Settings" = Settings(),
8585
xp=np,
8686
) -> np.ndarray:
87-
"""
87+
r"""
8888
Returns the curvature matrix `F` from a blurred mapping matrix `f` and the 1D noise-map $\sigma$
8989
(see Warren & Dye 2003).
9090

autoarray/mask/mask_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(
5454
*args,
5555
**kwargs,
5656
):
57-
"""
57+
r"""
5858
A 2D mask, used for masking values which are associated with a a uniform rectangular grid of pixels.
5959
6060
When applied to 2D data with the same shape, values in the mask corresponding to ``False`` entries are

autoarray/operators/over_sampling/over_sampler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class OverSampler:
1515
def __init__(self, mask: Mask2D, sub_size: Union[int, Array2D]):
16-
"""
16+
r"""
1717
Over samples grid calculations using a uniform sub-grid.
1818
1919
When a 2D grid of (y,x) coordinates is input into a function, the result is evaluated at every coordinate

autoarray/structures/arrays/uniform_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
*args,
3737
**kwargs,
3838
):
39-
"""
39+
r"""
4040
A uniform 2D array of values, which are paired with a 2D mask of pixels.
4141
4242
The ``Array2D`, like all data structures (e.g. ``Grid2D``, ``VectorYX2D``) has in-built functionality which:

autoarray/structures/grids/uniform_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
*args,
3434
**kwargs,
3535
):
36-
"""
36+
r"""
3737
A grid of 2D (y,x) coordinates, which are paired to a uniform 2D mask of pixels. Each entry
3838
on the grid corresponds to the (y,x) coordinates at the centre of a pixel of an unmasked pixel.
3939

autoarray/structures/vectors/uniform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(
2626
mask: Mask2D,
2727
store_native: bool = False,
2828
):
29-
"""
29+
r"""
3030
A collection of (y,x) vectors which are located on a regular 2D grid of (y,x) coordinates.
3131
3232
The vectors are paired to a uniform 2D mask of pixels. Each vector corresponds to a value at

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ test = ["pytest"]
5858
dev = ["pytest", "black", "numba", "pynufft==2022.2.2"]
5959

6060
[tool.pytest.ini_options]
61-
testpaths = ["test_autoarray"]
61+
testpaths = ["test_autoarray"]
62+
filterwarnings = [
63+
"ignore:cuda_plugin_extension:UserWarning",
64+
"ignore::DeprecationWarning:jax",
65+
]

0 commit comments

Comments
 (0)