From 67f55eeac7df5c461bf0c2428fd819499e97b26f Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Thu, 14 Nov 2019 10:24:33 +0100 Subject: [PATCH] Smooth global plots --- corbass/src/inversion.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/corbass/src/inversion.py b/corbass/src/inversion.py index d47f592..1b9cc20 100644 --- a/corbass/src/inversion.py +++ b/corbass/src/inversion.py @@ -1047,6 +1047,11 @@ class Inversion: Hannes' library. """ theta, phi = zip(*pyfield.equi_sph(n)) + # Phi's range is [0,2*pi]. To achieve smooth global plots with cartopy + # the interval depends on the central longitude (cl) chosen. AFAIK it + # shall be [-180+ct,180+ct] to have points that hit the projection's + # edges. If we agree on cl=0, subtracting pi shall do the job. + phi = np.subtract(phi, np.pi) colat, lon = np.rad2deg((theta, phi)) n_desi = len(colat) # Actual number of design points # Allocate array and store locations as expected by Hannes libraries -- GitLab