From 7f765d15af0142b3cddc21c47a10adfa8ae2248c Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Fri, 27 Sep 2024 12:02:05 -0400 Subject: [PATCH 1/3] Skip some doctests --- tweakwcs/imalign.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweakwcs/imalign.py b/tweakwcs/imalign.py index 6394168..3cc20ab 100644 --- a/tweakwcs/imalign.py +++ b/tweakwcs/imalign.py @@ -336,8 +336,8 @@ def align_wcs(wcscat, refcat=None, ref_tpwcs=None, enforce_user_order=True, valid. Therefore, it is advisable verify that status is ``'SUCCESS'`` before attempting to access other items, for example: - >>> fit_info = wcscat[0].meta.get('fit_info') # noqa - >>> if fit_info['status'] == 'SUCCESS': + >>> fit_info = wcscat[0].meta.get('fit_info') # doctest: +SKIP + >>> if fit_info['status'] == 'SUCCESS': # doctest: +SKIP ... print("shifts: [{}, {}]".format(*fit_info['shift'])) ... else: ... print("tweak info not available for this image") From 0e443dc6e221066038d490d0c2771e2f49a171bd Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Fri, 27 Sep 2024 12:52:57 -0400 Subject: [PATCH 2/3] fix style --- tweakwcs/imalign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweakwcs/imalign.py b/tweakwcs/imalign.py index 3cc20ab..49372c8 100644 --- a/tweakwcs/imalign.py +++ b/tweakwcs/imalign.py @@ -336,7 +336,7 @@ def align_wcs(wcscat, refcat=None, ref_tpwcs=None, enforce_user_order=True, valid. Therefore, it is advisable verify that status is ``'SUCCESS'`` before attempting to access other items, for example: - >>> fit_info = wcscat[0].meta.get('fit_info') # doctest: +SKIP + >>> fit_info = wcscat[0].meta.get('fit_info') # noqa # doctest: +SKIP >>> if fit_info['status'] == 'SUCCESS': # doctest: +SKIP ... print("shifts: [{}, {}]".format(*fit_info['shift'])) ... else: From 15f974dc5e9ae4bdd382fac03124f4858e2f3702 Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Fri, 27 Sep 2024 13:07:16 -0400 Subject: [PATCH 3/3] fix astropy dev tests --- tweakwcs/linearfit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweakwcs/linearfit.py b/tweakwcs/linearfit.py index 3b95e97..bb1eb8a 100644 --- a/tweakwcs/linearfit.py +++ b/tweakwcs/linearfit.py @@ -852,7 +852,7 @@ def build_fit_matrix(rot, scale=1): class _LevMarLSQFitter2x2(LMLSQFitter): """ Performs fits of 2D vector-models to 2D reference points. """ - def objective_function(self, fps, *args): + def objective_function(self, fps, *args, **kwargs): model, weights, inputs, meas, *_ = args fitter_to_model_params(model, fps) if weights is None: