From 1a34cbce4a16f5a47a2b8c186bef13918a9bcad9 Mon Sep 17 00:00:00 2001 From: TillHae Date: Sat, 7 Feb 2026 18:16:50 +0100 Subject: [PATCH] remove arc_alpha --- src/weathergen/datasets/tokenizer_utils.py | 10 ---------- src/weathergen/datasets/utils.py | 9 --------- 2 files changed, 19 deletions(-) diff --git a/src/weathergen/datasets/tokenizer_utils.py b/src/weathergen/datasets/tokenizer_utils.py index 17295d18a..3f8f11b9d 100644 --- a/src/weathergen/datasets/tokenizer_utils.py +++ b/src/weathergen/datasets/tokenizer_utils.py @@ -17,16 +17,6 @@ numpy_argsort_args = {"stable": True} if int(np.__version__.split(".")[0]) >= 2 else {} -def arc_alpha(sin_alpha, cos_alpha): - """Maps a point on the unit circle (np.array or torch.tensor), defined by its (cosine, sine) - coordinates to its spherical coordinate in [0,2pi) - """ - t = torch.arccos(cos_alpha) - mask = sin_alpha < 0.0 - t[mask] = (2.0 * np.pi) - t[mask] - return t - - def theta_phi_to_standard_coords(coords): thetas = ((90.0 - coords[:, 0]) / 180.0) * np.pi phis = ((coords[:, 1] + 180.0) / 360.0) * 2.0 * np.pi diff --git a/src/weathergen/datasets/utils.py b/src/weathergen/datasets/utils.py index a0e87ad4d..27b1af64a 100644 --- a/src/weathergen/datasets/utils.py +++ b/src/weathergen/datasets/utils.py @@ -16,15 +16,6 @@ from weathergen.datasets.batch import BatchSamples -#################################################################################################### -def arc_alpha(sin_alpha, cos_alpha): - """Invert cosine/sine for alpha in [0,2pi] using both functions""" - t = torch.arccos(cos_alpha) - mask = sin_alpha < 0.0 - t[mask] = (2.0 * np.pi) - t[mask] - return t - - #################################################################################################### def vecs_to_rots(vecs): """