From ec4c56e03ecc1532970c0ac6b98493436b760bb9 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 00:15:50 +0200 Subject: [PATCH 1/9] make size a property of noise covariance operators --- brahmap/base/noise_ops.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/brahmap/base/noise_ops.py b/brahmap/base/noise_ops.py index 800c19e..7c326a8 100644 --- a/brahmap/base/noise_ops.py +++ b/brahmap/base/noise_ops.py @@ -39,6 +39,8 @@ def __init__( message="Please provide only one of `covariance` or `power_spectrum`", ) + self.__size = nargin + super(NoiseCovLinearOperator, self).__init__( nargin=nargin, nargout=nargin, @@ -48,7 +50,9 @@ def __init__( **kwargs, ) - self.size = nargin + @property + def size(self) -> int: + return self.__size @property def diag(self) -> np.ndarray: @@ -123,7 +127,10 @@ def __init__( exception=ValueError, message="The noise (inv-)covariance operators must be symmetric", ) - self.size = sum(self.col_size) + + @property + def size(self) -> int: + return sum(self.col_size) @property def diag(self) -> np.ndarray: From 1ba826cd728fa1f3caed85a7983705016cecf166 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 00:33:44 +0200 Subject: [PATCH 2/9] removed rtol argument from brahmap.math.cg(), although it was implemented similarly to scipy.sparse.linalg.cg(), it causes the stopping criteria to become dynamic, depending on the norm of vector b. This change simplifies the convergence behavior --- brahmap/core/noise_ops_toeplitz.py | 5 ----- brahmap/math/linalg.py | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/brahmap/core/noise_ops_toeplitz.py b/brahmap/core/noise_ops_toeplitz.py index 43d7124..6a9218a 100644 --- a/brahmap/core/noise_ops_toeplitz.py +++ b/brahmap/core/noise_ops_toeplitz.py @@ -133,8 +133,6 @@ class InvNoiseCovLO_Toeplitz01(InvNoiseCovLinearOperator): _description_, by default None precond_maxiter : int, optional _description_, by default 50 - precond_rtol : float, optional - _description_, by default 1.0e-10 precond_atol : float, optional _description_, by default 1.0e-10 precond_callback : Callable, optional @@ -152,7 +150,6 @@ def __init__( LinearOperator, Literal[None, "Strang", "TChan", "RChan", "KK2"] ] = None, precond_maxiter: int = 50, - precond_rtol: float = 1.0e-10, precond_atol: float = 1.0e-10, precond_callback: Callable = None, dtype: DTypeFloat = np.float64, @@ -164,7 +161,6 @@ def __init__( dtype=dtype, ) - self.__precond_rtol = precond_rtol self.__precond_atol = precond_atol self.__precond_maxiter = precond_maxiter self.__precond_callback = precond_callback @@ -252,7 +248,6 @@ def _mult(self, vec: np.ndarray): prod, _ = cg( A=self.__toeplitz_op, b=vec, - rtol=self.__precond_rtol, atol=self.__precond_atol, maxiter=self.__precond_maxiter, M=self.__precond_op, diff --git a/brahmap/math/linalg.py b/brahmap/math/linalg.py index a4f2c5a..ed9d164 100644 --- a/brahmap/math/linalg.py +++ b/brahmap/math/linalg.py @@ -32,7 +32,6 @@ def cg( A: LinearOperator, b: np.ndarray, x0: np.ndarray = None, - rtol: float = 1.0e-12, atol: float = 1.0e-12, maxiter: int = 100, M: LinearOperator = None, @@ -51,8 +50,6 @@ def cg( _description_ x0 : np.ndarray, optional _description_, by default None - rtol : float, optional - _description_, by default 1.0e-12 atol : float, optional _description_, by default 1.0e-12 maxiter : int, optional @@ -93,13 +90,6 @@ def cg( b_norm = norm_function(b) - atol, _ = scipy.sparse.linalg._isolve.iterative._get_atol_rtol( - "cg", - b_norm, - atol, - rtol, - ) - if b_norm == 0: return b, 0 From 76a0a6e1a5a7d0f6c37bf871c08c88249233e5da Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 11:55:21 +0200 Subject: [PATCH 3/9] the classes BlockDiagNoiseCovLO and BlockDiagInvNoiseCovLO can now accept a dict mapping block size to the noise property as block_input. This enables using a single instance of noise operator multiple times in the block list by reference if the block size and noise properties are same. This saves the memory a lot --- brahmap/core/noise_ops_block_diag.py | 94 +++++++++++++++++++++------- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/brahmap/core/noise_ops_block_diag.py b/brahmap/core/noise_ops_block_diag.py index c354c0a..1d022cd 100644 --- a/brahmap/core/noise_ops_block_diag.py +++ b/brahmap/core/noise_ops_block_diag.py @@ -18,7 +18,7 @@ class BlockDiagNoiseCovLO(BaseBlockDiagNoiseCovLinearOperator): _description_ block_size : Union[np.ndarray, List] _description_ - block_input : List[Union[np.ndarray, List]] + block_input : Union[List, Dict] _description_ input_type : Literal["covariance", "power_spectrum"], optional _description_, by default "power_spectrum" @@ -32,36 +32,55 @@ def __init__( self, operator, block_size: Union[np.ndarray, List], - block_input: List[Union[np.ndarray, List]], + block_input: Union[List, Dict], input_type: Literal["covariance", "power_spectrum"] = "power_spectrum", dtype: DTypeFloat = np.float64, extra_kwargs: Dict[str, Any] = {}, ): - MPI_RAISE_EXCEPTION( - condition=(len(block_size) != len(block_input)), - exception=ValueError, - message="The number of blocks listed in `block_size` is different" - "from the number of blocks listed in `block_input`", - ) + if isinstance(block_input, list): + MPI_RAISE_EXCEPTION( + condition=(len(block_size) != len(block_input)), + exception=ValueError, + message="The number of blocks listed in `block_size` is different" + " from the number of blocks provided in `block_input`", + ) - block_list = self.__build_blocks( - operator=operator, - block_size=block_size, - block_input=block_input, - input_type=input_type, - dtype=dtype, - extra_kwargs=extra_kwargs, - ) + block_list = self.__build_blocks_from_list( + operator=operator, + block_size=block_size, + block_input=block_input, + input_type=input_type, + dtype=dtype, + extra_kwargs=extra_kwargs, + ) + + elif isinstance(block_input, dict): + block_list = self.__build_blocks_from_dict( + operator=operator, + block_size=block_size, + block_input=block_input, + input_type=input_type, + dtype=dtype, + extra_kwargs=extra_kwargs, + ) + + else: + MPI_RAISE_EXCEPTION( + condition=True, + exception=ValueError, + message="`block_input` must be either a list of arrays or list" + " OR a dictionary that maps operator size to an array or a list", + ) super(BlockDiagNoiseCovLO, self).__init__( block_list=block_list, ) - def __build_blocks( + def __build_blocks_from_list( self, operator, - block_input, - block_size, + block_input: List, + block_size: Union[np.ndarray, List], input_type, dtype, extra_kwargs, @@ -76,6 +95,39 @@ def __build_blocks( **extra_kwargs, ) block_list.append(block_op) + + return block_list + + def __build_blocks_from_dict( + self, + operator, + block_input: Dict, + block_size: Union[np.ndarray, List], + input_type, + dtype, + extra_kwargs, + ): + op_dict = {} + for shape in block_input.keys(): + op_dict[shape] = operator( + size=shape, + input=block_input[shape], + input_type=input_type, + dtype=dtype, + **extra_kwargs, + ) + + block_list = [] + for shape in block_size: + if shape in op_dict.keys(): + block_list.append(op_dict[shape]) + else: + MPI_RAISE_EXCEPTION( + condition=True, + exception=ValueError, + message=f"Operator for shape {shape} is missing from the input dictionary", + ) + return block_list @@ -88,7 +140,7 @@ class BlockDiagInvNoiseCovLO(BlockDiagNoiseCovLO): _description_ block_size : Union[np.ndarray, List] _description_ - block_input : List[Union[np.ndarray, List]] + block_input : Union[List, Dict] _description_ input_type : Literal["covariance", "power_spectrum"], optional _description_, by default "power_spectrum" @@ -102,7 +154,7 @@ def __init__( self, operator, block_size: Union[np.ndarray, List], - block_input: List[Union[np.ndarray, List]], + block_input: Union[List, Dict], input_type: Literal["covariance", "power_spectrum"] = "power_spectrum", dtype: DTypeFloat = np.float64, extra_kwargs: Dict[str, Any] = {}, From 9b7630c454074397786121148717e3e0b3443448 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 12:05:14 +0200 Subject: [PATCH 4/9] updated LBSim_InvNoiseCovLO_UnCorr to allow repeating similar inverse covariance blocks by reference --- brahmap/lbsim/lbsim_noise_operators.py | 33 +++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/brahmap/lbsim/lbsim_noise_operators.py b/brahmap/lbsim/lbsim_noise_operators.py index 41a740e..3bd9306 100644 --- a/brahmap/lbsim/lbsim_noise_operators.py +++ b/brahmap/lbsim/lbsim_noise_operators.py @@ -1,4 +1,5 @@ -from typing import List, Union, Literal, Dict, Any, Optional +from typing import List, Union, Literal, Dict, Any +import numbers import numpy as np import litebird_sim as lbs @@ -25,7 +26,7 @@ class LBSim_InvNoiseCovLO_UnCorr(BlockDiagInvNoiseCovLO): ---------- obs : Union[lbs.Observation, List[lbs.Observation]] _description_ - noise_variance : Optional[dict], optional + noise_variance : Union[dict, DTypeFloat, None], optional _description_, by default None dtype : DTypeFloat, optional _description_, by default np.float64 @@ -36,7 +37,7 @@ class LBSim_InvNoiseCovLO_UnCorr(BlockDiagInvNoiseCovLO): def __init__( self, obs: Union[lbs.Observation, List[lbs.Observation]], - noise_variance: Optional[dict] = None, + noise_variance: Union[dict, DTypeFloat, None] = None, dtype: DTypeFloat = np.float64, ): if isinstance(obs, lbs.Observation): @@ -51,6 +52,13 @@ def __init__( lbs.mapmaking.common.get_map_making_weights(obs_list[0]) / 1.0e4, ) ) + elif isinstance(noise_variance, numbers.Number): + noise_variance = dict( + zip( + obs_list[0].name, + [noise_variance] * len(obs_list[0].name), + ) + ) # setting the `noise_variance` to 1 for the detectors whose noise variance is not provided in the dictionary det_no_variance = np.setdiff1d(obs_list[0].name, list(noise_variance.keys())) @@ -58,12 +66,21 @@ def __init__( noise_variance[detector] = 1.0 block_size = [] - block_input = [] - for obs in obs_list: - for det_idx in range(obs.n_detectors): - block_size.append(obs.n_samples) - block_input.append(noise_variance[obs.name[det_idx]]) + if len(set(noise_variance.values())) == 1: + # That is, when all values in noise variance is the same + block_input = {} + for obs in obs_list: + for det_idx in range(obs.n_detectors): + block_size.append(obs.n_samples) + if obs.n_samples not in block_input.keys(): + block_input[obs.n_samples] = noise_variance[obs.name[0]] + else: + block_input = [] + for obs in obs_list: + for det_idx in range(obs.n_detectors): + block_size.append(obs.n_samples) + block_input.append(noise_variance[obs.name[det_idx]]) super(LBSim_InvNoiseCovLO_UnCorr, self).__init__( InvNoiseCovLO_Diagonal, From 4c5aeb813ce29e5bdf670bd71d4666e959e92ed5 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 12:10:35 +0200 Subject: [PATCH 5/9] updated LBSim_InvNoiseCovLO_Circulant to allow repeating similar inverse covariance blocks by reference --- brahmap/lbsim/lbsim_noise_operators.py | 44 ++++++++++++++++++-------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/brahmap/lbsim/lbsim_noise_operators.py b/brahmap/lbsim/lbsim_noise_operators.py index 3bd9306..3e2c47c 100644 --- a/brahmap/lbsim/lbsim_noise_operators.py +++ b/brahmap/lbsim/lbsim_noise_operators.py @@ -15,6 +15,8 @@ from ..math import DTypeFloat +from ..mpi import MPI_RAISE_EXCEPTION + class LBSim_InvNoiseCovLO_UnCorr(BlockDiagInvNoiseCovLO): """_summary_ @@ -119,31 +121,47 @@ def __init__( obs_list = obs block_size = [] - block_input = [] - for obs in obs_list: - if isinstance(input, dict): + if isinstance(input, dict): + block_input = [] + + for obs in obs_list: # if input is a dict for det_idx in range(obs.n_detectors): block_size.append(obs.n_samples) - resized_input = self._resize_input( + + resized_input = self.__resize_input( new_size=obs.n_samples, input=input[obs.name[det_idx]], input_type=input_type, dtype=dtype, ) + block_input.append(resized_input) - else: + + elif isinstance(input, (np.ndarray, list)): + block_input = {} + + for obs in obs_list: for det_idx in range(obs.n_detectors): # if input is an array or a list, it will be taken as same for all the detectors available in the observation block_size.append(obs.n_samples) - resized_input = self._resize_input( - new_size=obs.n_samples, - input=input, - input_type=input_type, - dtype=dtype, - ) - block_input.append(resized_input) + + if obs.n_samples not in block_input.keys(): + resized_input = self.__resize_input( + new_size=obs.n_samples, + input=input, + input_type=input_type, + dtype=dtype, + ) + + block_input[obs.n_samples] = resized_input + else: + MPI_RAISE_EXCEPTION( + condition=True, + exception=ValueError, + message="The input must be an array or a list or a dictionary that maps detector names to their covariance/power spectrum", + ) super(LBSim_InvNoiseCovLO_Circulant, self).__init__( InvNoiseCovLO_Circulant, @@ -153,7 +171,7 @@ def __init__( dtype=dtype, ) - def _resize_input(self, new_size, input, input_type, dtype): + def __resize_input(self, new_size, input, input_type, dtype): if input_type == "covariance": # if the size of the returned array is smaller than new_size, it # will be captured by the InvNoiseCovLO_Circulant class From b4c1198e8e3ca6579d36393ec17ca17905ae3359 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 12:14:13 +0200 Subject: [PATCH 6/9] updated LBSim_InvNoiseCovLO_Toeplitz to allow repeating similar inverse covariance blocks by reference --- brahmap/lbsim/lbsim_noise_operators.py | 44 ++++++++++++++++++-------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/brahmap/lbsim/lbsim_noise_operators.py b/brahmap/lbsim/lbsim_noise_operators.py index 3e2c47c..228dafe 100644 --- a/brahmap/lbsim/lbsim_noise_operators.py +++ b/brahmap/lbsim/lbsim_noise_operators.py @@ -236,31 +236,47 @@ def __init__( obs_list = obs block_size = [] - block_input = [] - for obs in obs_list: - if isinstance(input, dict): + if isinstance(input, dict): + block_input = [] + + for obs in obs_list: # if input is a dict for det_idx in range(obs.n_detectors): block_size.append(obs.n_samples) - resized_input = self._resize_input( + + resized_input = self.__resize_input( new_size=obs.n_samples, input=input[obs.name[det_idx]], input_type=input_type, dtype=dtype, ) + block_input.append(resized_input) - else: - # if input is an array or a list, it will be taken as same for all the detectors available in the observation + + elif isinstance(input, (np.ndarray, list)): + block_input = {} + + for obs in obs_list: for det_idx in range(obs.n_detectors): + # if input is an array or a list, it will be taken as same for all the detectors available in the observation block_size.append(obs.n_samples) - resized_input = self._resize_input( - new_size=obs.n_samples, - input=input, - input_type=input_type, - dtype=dtype, - ) - block_input.append(resized_input) + + if obs.n_samples not in block_input.keys(): + resized_input = self.__resize_input( + new_size=obs.n_samples, + input=input, + input_type=input_type, + dtype=dtype, + ) + + block_input[obs.n_samples] = resized_input + else: + MPI_RAISE_EXCEPTION( + condition=True, + exception=ValueError, + message="The input must be an array or a list or a dictionary that maps detector names to their covariance/power spectrum", + ) super(LBSim_InvNoiseCovLO_Toeplitz, self).__init__( operator, @@ -271,7 +287,7 @@ def __init__( extra_kwargs=extra_kwargs, ) - def _resize_input(self, new_size, input, input_type, dtype): + def __resize_input(self, new_size, input, input_type, dtype): if input_type == "covariance": # if the size of the returned array is smaller than new_size, it # will be captured by the InvNoiseCovLO_Toeplitz0x class From 7cbb936216718c91807ebe731ce965727cf22fa0 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 12:51:41 +0200 Subject: [PATCH 7/9] it is now possible to keep track of the number of iterations before pcg converges for inverse Toeplitz covariance --- brahmap/core/noise_ops_toeplitz.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/brahmap/core/noise_ops_toeplitz.py b/brahmap/core/noise_ops_toeplitz.py index 6a9218a..80c90bd 100644 --- a/brahmap/core/noise_ops_toeplitz.py +++ b/brahmap/core/noise_ops_toeplitz.py @@ -165,6 +165,8 @@ def __init__( self.__precond_maxiter = precond_maxiter self.__precond_callback = precond_callback + self.__last_num_iterations = 0 + if precond_op is None: self.__precond_op = None elif isinstance(precond_op, LinearOperator) or isinstance( @@ -227,9 +229,18 @@ def diag(self) -> np.ndarray: factor = 1.0 return factor * np.ones(self.size, dtype=self.dtype) + @property + def get_last_num_iterations(self) -> int: + return self.__last_num_iterations + def get_inverse(self): return self.__toeplitz_op + def __callback(self, x, r, norm_residual): + self.__last_num_iterations += 1 + if self.__precond_callback is not None: + self.__precond_callback(x, r, norm_residual) + def _mult(self, vec: np.ndarray): MPI_RAISE_EXCEPTION( condition=(len(vec) != self.shape[0]), @@ -237,6 +248,8 @@ def _mult(self, vec: np.ndarray): message=f"Dimensions of `vec` is not compatible with the dimensions of this `InvNoiseCovLO_Toeplitz` instance.\nShape of `InvNoiseCovLO_Toeplitz` instance: {self.shape}\nShape of `vec`: {vec.shape}", ) + self.__last_num_iterations = 0 + if vec.dtype != self.dtype: if MPI_UTILS.rank == 0: warnings.warn( @@ -251,7 +264,7 @@ def _mult(self, vec: np.ndarray): atol=self.__precond_atol, maxiter=self.__precond_maxiter, M=self.__precond_op, - callback=self.__precond_callback, + callback=self.__callback, parallel=False, ) From 6f51025eddf3398790609a109f738067467275f5 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 13:08:50 +0200 Subject: [PATCH 8/9] added more files to execute_example script --- examples/execute_examples.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/execute_examples.sh b/examples/execute_examples.sh index d511cb4..a286396 100644 --- a/examples/execute_examples.sh +++ b/examples/execute_examples.sh @@ -5,6 +5,9 @@ ipynb_filename=("rectangular_I_map_explicit.ipynb" "healpix_QU_map_wrapper.ipynb" "lbsim_IQU_map_explicit.ipynb" "lbsim_IQU_map_wrapper.ipynb" + "basic_noise_covariances.ipynb" + "block_diagonal_noise_covariances.ipynb" + "lbsim_noise_covariances.ipynb" ) py_filename=("rectangular_I_map_wrapper.py" From 87bd52b1d5b1fabf7a91737870de16c5014cb7db Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Fri, 5 Sep 2025 14:06:30 +0200 Subject: [PATCH 9/9] removed the test on number of itearations as convergence is all that matters --- tests/test_GLSmapmakers.py | 12 ++++++------ tests/test_LBSim_GLS.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_GLSmapmakers.py b/tests/test_GLSmapmakers.py index 2d5a0dd..86ead22 100644 --- a/tests/test_GLSmapmakers.py +++ b/tests/test_GLSmapmakers.py @@ -134,7 +134,7 @@ def test_GLSMapMakers_I_const_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_I_map = np.ma.MaskedArray( data=initfloat.const_I_map, @@ -185,7 +185,7 @@ def test_GLSMapMakers_QU_const_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_Q_map = np.ma.MaskedArray( data=initfloat.const_Q_map, @@ -249,7 +249,7 @@ def test_GLSMapMakers_IQU_const_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_I_map = np.ma.MaskedArray( data=initfloat.const_I_map, @@ -327,7 +327,7 @@ def test_GLSMapMakers_I_rand_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_I_map = np.ma.MaskedArray( data=initfloat.rand_I_map, @@ -377,7 +377,7 @@ def test_GLSMapMakers_QU_rand_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_Q_map = np.ma.MaskedArray( data=initfloat.rand_Q_map, @@ -440,7 +440,7 @@ def test_GLSMapMakers_IQU_rand_map(self, initint, initfloat, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_I_map = np.ma.MaskedArray( data=initfloat.rand_I_map, diff --git a/tests/test_LBSim_GLS.py b/tests/test_LBSim_GLS.py index 0e6609e..eafd9ac 100644 --- a/tests/test_LBSim_GLS.py +++ b/tests/test_LBSim_GLS.py @@ -185,7 +185,7 @@ def test_LBSim_compute_GLS_maps_I(self, lbsim_obj, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_map = np.ma.masked_array( lbsim_obj.input_map[0], @@ -236,7 +236,7 @@ def test_LBSim_compute_GLS_maps_QU(self, lbsim_obj, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_map = np.ma.masked_array( lbsim_obj.input_map[1:], GLSresults.GLS_maps.mask, fill_value=hp.UNSEEN @@ -272,7 +272,7 @@ def test_LBSim_compute_GLS_maps_IQU(self, lbsim_obj, rtol, atol): ) np.testing.assert_equal(GLSresults.convergence_status, True) - np.testing.assert_equal(GLSresults.num_iterations, 1) + # np.testing.assert_equal(GLSresults.num_iterations, 1) input_map = np.ma.masked_array( lbsim_obj.input_map, GLSresults.GLS_maps.mask, fill_value=hp.UNSEEN