From 49b9e24bdba0835c03f407e8599ddc57fcee5aed Mon Sep 17 00:00:00 2001 From: maxbalrog Date: Wed, 18 Mar 2026 13:34:11 +0100 Subject: [PATCH] change default angle resolution for spherical grid to fit the given cartesian grid --- src/quvac/postprocess.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/quvac/postprocess.py b/src/quvac/postprocess.py index 1207977..6610fd9 100644 --- a/src/quvac/postprocess.py +++ b/src/quvac/postprocess.py @@ -141,7 +141,9 @@ def cartesian_to_spherical_array( if not spherical_grid: dk = np.min(xyz_grid.dkxkykz) kmax = np.max(xyz_grid.kabs) - dangle = angular_resolution if angular_resolution else 1.0 * pi / 180 + # dangle = angular_resolution if angular_resolution else 1.0 * pi / 180 + default_resolution = dk / kmax + dangle = angular_resolution if angular_resolution else default_resolution k = np.arange(0.0, kmax, dk, dtype=config.FDTYPE) theta = np.arange(0.0, pi, dangle, dtype=config.FDTYPE)