From 9b2d442d727e9c45fab321b1ab367c08033dc4d1 Mon Sep 17 00:00:00 2001 From: Mathew Madhavacheril Date: Sun, 2 Nov 2025 19:45:41 -0500 Subject: [PATCH] Warning if no WCS is specified --- pixell/enmap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pixell/enmap.py b/pixell/enmap.py index ab04efdb..5a2103f1 100644 --- a/pixell/enmap.py +++ b/pixell/enmap.py @@ -402,6 +402,7 @@ def has_wcs(m): elif isinstance(arr, list) and len(arr) > 0 and has_wcs(arr[0]): wcs = arr[0].wcs else: + warnings.warn("An empty WCS with default values is being attached, since no WCS was specified. This may result in unexpected results.") wcs = wcsutils.WCS(naxis=2) if copy: arr = np.asanyarray(arr, dtype=dtype).copy()